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

Method skipFully

output/java_guava/1.4.17/CharStreams.java:192–201  ·  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

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.

Callers

nothing calls this directly

Calls 2

checkNotNullMethod · 0.45
skipMethod · 0.45

Tested by

no test coverage detected