|
Oracle interMedia Java Classes API Reference 10g Release 2 (10.2) Part No. B14301-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
An interface describing an input stream that is seekable.
| Method Summary | |
void |
close()Closes the input stream and releases any resources associated with this stream. |
long |
getFilePointer()Returns the current offset in this stream. |
int |
read()Reads a single byte from the stream. |
int |
read(byte[] b)Reads up to the specified number of bytes from the stream into the specified byte array of specified length. |
int |
read(byte[] b, int off, int len)Reads up to the specified number of bytes from the stream into the specified byte array starting at the starting position for the offset. |
void |
seek(long pos)Sets the file-pointer offset, measured from the beginning of the stream, at which the next read will occur. |
long |
skip(long n)Attempts to skip over the specified number of bytes of input. |
| Method Detail |
public long getFilePointer()
throws java.lang.Exception
java.lang.Exception - if an IO error occurs.
public void seek(long pos)
throws java.lang.Exception
pos - the offset position, measured in bytes from the beginning of the stream, at which to set the file pointer.java.lang.Exception - if the value of the pos parameter is less than zero or if an IO error occurs.
public int read()
throws java.lang.Exception
int) in the range of 0 to 255, or -1 if the end of the stream has been reached.java.lang.Exception - if an IO error occurs.
public int read(byte[] b,
int off,
int len)
throws java.lang.Exception
b - the buffer into which the data will be read.off - the starting position for the offset in the byte array.len - the maximum number of bytes to be read.java.lang.Exception - if an IO error occurs.
public int read(byte[] b)
throws java.lang.Exception
b - the buffer into which the data will be read.java.lang.Exception - if an IO error occurs.
public long skip(long n)
throws java.lang.Exception
This method may skip over some smaller number of bytes, possibly zero. This action may result from a number of conditions. For example, reaching the end of the stream before the specified number of bytes have been skipped. This method never throws an end-of-file exception.
n - the number of bytes to be skipped.java.lang.Exception - if an IO error occurs.
public void close()
throws java.lang.Exception
java.lang.Exception - if an IO error occurs.
|
Oracle interMedia Java Classes API Reference 10g Release 2 (10.2) Part No. B14301-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||