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

Method skipFully

guava/src/com/google/common/io/ByteStreams.java:828–834  ·  view source on GitHub ↗

Discards {@code n} bytes of data from the input stream. This method will block until the full amount has been skipped. Does not close the stream. @param in the input stream to read from @param n the number of bytes to skip @throws EOFException if this stream reaches the end before skipping all the

(InputStream in, long n)

Source from the content-addressed store, hash-verified

826 * @throws IOException if an I/O error occurs, or the stream does not support skipping
827 */
828 public static void skipFully(InputStream in, long n) throws IOException {
829 long skipped = skipUpTo(in, n);
830 if (skipped < n) {
831 throw new EOFException(
832 "reached end of stream after skipping " + skipped + " bytes; " + n + " bytes expected");
833 }
834 }
835
836 /**
837 * Discards up to {@code n} bytes of data from the input stream. This method will block until

Callers 2

testSkipMethod · 0.95
skipHelperMethod · 0.95

Calls 1

skipUpToMethod · 0.95

Tested by

no test coverage detected