(Reader reader)
| 228 | } |
| 229 | |
| 230 | private static long countBySkipping(Reader reader) throws IOException { |
| 231 | long count = 0; |
| 232 | long read; |
| 233 | while ((read = reader.skip(Long.MAX_VALUE)) != 0) { |
| 234 | count += read; |
| 235 | } |
| 236 | return count; |
| 237 | } |
| 238 | |
| 239 | /** |
| 240 | * Appends the contents of this source to the given {@link Appendable} (such as a {@link Writer}). |