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)
| 180 | * @throws IOException if an I/O error occurs |
| 181 | */ |
| 182 | public static void skipFully(Reader reader, long n) throws IOException { |
| 183 | checkNotNull(reader); |
| 184 | while (n > 0) { |
| 185 | long amt = reader.skip(n); |
| 186 | if (amt == 0) { |
| 187 | throw new EOFException(); |
| 188 | } |
| 189 | n -= amt; |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | /** |
| 194 | * Returns a {@link Writer} that simply discards written chars. |
nothing calls this directly
no test coverage detected