Discards n characters of data from the reader. This method will block until the full amount has been skipped. Does not close the reader. @param reader the reader to read from @param n the number of characters to skip @throws EOFException if this stream reaches the end before skipping all th
(Reader reader, long n)
| 190 | |
| 191 | |
| 192 | public static void skipFully(Reader reader, long n) throws IOException { |
| 193 | checkNotNull(reader); |
| 194 | while (n > 0) { |
| 195 | long amt = reader.skip(n); |
| 196 | if (amt == 0) { |
| 197 | throw new EOFException(); |
| 198 | } |
| 199 | n -= amt; |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * Returns a {@link Writer} that simply discards written chars. |
nothing calls this directly
no test coverage detected