MCPcopy
hub / github.com/google/guava / countBySkipping

Method countBySkipping

guava/src/com/google/common/io/ByteSource.java:232–239  ·  view source on GitHub ↗

Counts the bytes in the given input stream using skip if possible.

(InputStream in)

Source from the content-addressed store, hash-verified

230
231 /** Counts the bytes in the given input stream using skip if possible. */
232 private static long countBySkipping(InputStream in) throws IOException {
233 long count = 0;
234 long skipped;
235 while ((skipped = skipUpTo(in, Integer.MAX_VALUE)) > 0) {
236 count += skipped;
237 }
238 return count;
239 }
240
241 /**
242 * 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