Java Code Examples for libcore.io.Streams#skipByReading()
The following examples show how to use
libcore.io.Streams#skipByReading() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StrictJarFile.java From android_9.0.0_r45 with Apache License 2.0 | 4 votes |
@Override public long skip(long byteCount) throws IOException { return Streams.skipByReading(this, byteCount); }
Example 2
Source File: DeflaterInputStream.java From jtransc with Apache License 2.0 | 4 votes |
/** * {@inheritDoc} * <p>Note: if {@code n > Integer.MAX_VALUE}, this stream will only attempt to * skip {@code Integer.MAX_VALUE} bytes. */ @Override public long skip(long byteCount) throws IOException { byteCount = Math.min(Integer.MAX_VALUE, byteCount); return Streams.skipByReading(this, byteCount); }
Example 3
Source File: InflaterInputStream.java From jtransc with Apache License 2.0 | 3 votes |
/** * Skips up to {@code byteCount} bytes of uncompressed data. * * @param byteCount the number of bytes to skip. * @return the number of uncompressed bytes skipped. * @throws IllegalArgumentException if {@code byteCount < 0}. * @throws IOException if an error occurs skipping. */ @Override public long skip(long byteCount) throws IOException { if (byteCount < 0) { throw new IllegalArgumentException("byteCount < 0"); } return Streams.skipByReading(this, byteCount); }
Example 4
Source File: CheckedInputStream.java From jtransc with Apache License 2.0 | 2 votes |
/** * Skip up to {@code byteCount} bytes of data on the underlying input * stream. Any skipped bytes are added to the running checksum value. * * @param byteCount the number of bytes to skip. * @throws IOException if this stream is closed or another I/O error occurs. * @return the number of bytes skipped. */ @Override public long skip(long byteCount) throws IOException { return Streams.skipByReading(this, byteCount); }