InputStream.skip
Class Overview | Class Members |
This Package |
All Packages
public long skip( long n ) throws IOException
Parameters
- n
- the number of bytes to be skipped.
Returns
the actual number of bytes skipped.
Description
Skips over and discards n bytes of data from this
input stream. The skip method may, for a variety of
reasons, end up skipping over some smaller number of bytes,
possibly 0. The actual number of bytes skipped is
returned.
The skip method of InputStream creates
a byte array of length n and then reads into it until
n bytes have been read or the end of the stream has
been reached. Subclasses are encouraged to provide a more
efficient implementation of this method.
Exceptions
IOException
if an I/O error occurs.