|
Oracle® Multimedia Java API Reference 11g Release 2 (11.2) E10779-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
oracle.ord.media.jai.io.FileSeekableInputStream
public class FileSeekableInputStream
The FileSeekableInputStream implements the oracle.ord.media.io.SeekableInputStream interface to read data from a file. Forward and backward seeking are supported.
| Constructor Summary | |
|---|---|
FileSeekableInputStream(java.io.File file)Creates a FileSeekableInputStream object that reads from a file. |
|
FileSeekableInputStream(java.lang.String fileName)Creates a FileSeekableInputStream object that reads from a named file. |
|
| 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 data from the stream into the specified byte array, up to the length of the specified byte array. |
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 operation will occur. |
long |
skip(long n)Attempts to skip over the specified number of bytes of input. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileSeekableInputStream(java.io.File file)
throws java.io.IOException,
java.io.FileNotFoundException
file - the file from which the data will be read.java.io.FileNotFoundException - if the file does not exist.java.io.IOException - if an IO error occurs or if the value of the file parameter is null.
public FileSeekableInputStream(java.lang.String fileName)
throws java.io.IOException,
java.io.FileNotFoundException
name - the name of the system-dependent file.java.io.FileNotFoundException - if the file does not exist.java.io.IOException - if an IO error occurs or if the value of the name parameter is null.| Method Detail |
|---|
public long getFilePointer()
throws java.lang.Exception
getFilePointer in interface SeekableInputStreamjava.lang.Exception - if an IO error occurs.
public void seek(long pos)
throws java.lang.Exception
seek in interface SeekableInputStreampos - 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
read in interface SeekableInputStreamint) 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
read in interface SeekableInputStreamb - 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
read in interface SeekableInputStreamb - 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.
skip in interface SeekableInputStreamn - the number of bytes to be skipped.java.lang.Exception - if an IO error occurs.
public void close()
throws java.lang.Exception
close in interface SeekableInputStreamjava.lang.Exception - if an IO error occurs.
|
Oracle® Multimedia Java API Reference 11g Release 2 (11.2) E10779-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||