MCPcopy Create free account
hub / github.com/antlr/codebuff / skipFully

Method skipFully

corpus/java/training/guava/io/CharStreams.java:182–191  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 2

checkNotNullMethod · 0.45
skipMethod · 0.45

Tested by

no test coverage detected