MCPcopy Index your code
hub / github.com/antlr/codebuff / countBySkipping

Method countBySkipping

output/java_guava/1.4.17/ByteSource.java:237–244  ·  view source on GitHub ↗

Counts the bytes in the given input stream using skip if possible. Returns SKIP_FAILED if the first call to skip threw, in which case skip may just not be supported.

(InputStream in)

Source from the content-addressed store, hash-verified

235 */
236
237 private long countBySkipping(InputStream in) throws IOException {
238 long count = 0;
239 long skipped;
240 while ((skipped = skipUpTo(in, Integer.MAX_VALUE)) > 0) {
241 count += skipped;
242 }
243 return count;
244 }
245
246 /**
247 * Copies the contents of this byte source to the given {@code OutputStream}. Does not close

Callers 1

sizeMethod · 0.95

Calls 1

skipUpToMethod · 0.45

Tested by

no test coverage detected