| java.lang.Object com.caucho.vfs.RandomAccessStream
All known Subclasses: com.caucho.vfs.SpyRandomAccessStream, com.caucho.vfs.FileRandomAccessStream,
RandomAccessStream | abstract public class RandomAccessStream implements LockableStream(Code) | | Reads from a file in a random-access fashion.
|
Method Summary | |
public void | close() Closes the stream. | abstract public long | getFilePointer() Returns the current position of the file pointer. | abstract public InputStream | getInputStream() Returns an InputStream for this stream. | abstract public long | getLength() Returns the length. | abstract public OutputStream | getOutputStream() Returns an OutputStream for this stream. | public boolean | lock(boolean shared, boolean block) | abstract public int | read(byte[] buffer, int offset, int length) Reads a block starting from the current file pointer. | abstract public int | read(char[] buffer, int offset, int length) Reads a block starting from the current file pointer. | abstract public int | read(long fileOffset, byte[] buffer, int offset, int length) Reads a block from a given location. | abstract public int | read() Read a byte from the file, advancing the pointer. | abstract public boolean | seek(long position) Seeks to the given position in the file. | public boolean | unlock() | abstract public void | write(byte[] buffer, int offset, int length) Writes a block starting from the current file pointer. | abstract public void | write(long fileOffset, byte[] buffer, int offset, int length) Writes a block to a given location. | abstract public void | write(int b) Write a byte to the file, advancing the pointer. |
getFilePointer | abstract public long getFilePointer() throws IOException(Code) | | Returns the current position of the file pointer.
|
getLength | abstract public long getLength() throws IOException(Code) | | Returns the length.
|
lock | public boolean lock(boolean shared, boolean block)(Code) | | |
read | abstract public int read(byte[] buffer, int offset, int length) throws IOException(Code) | | Reads a block starting from the current file pointer.
|
read | abstract public int read(char[] buffer, int offset, int length) throws IOException(Code) | | Reads a block starting from the current file pointer.
|
read | abstract public int read(long fileOffset, byte[] buffer, int offset, int length) throws IOException(Code) | | Reads a block from a given location.
|
read | abstract public int read() throws IOException(Code) | | Read a byte from the file, advancing the pointer.
|
seek | abstract public boolean seek(long position)(Code) | | Seeks to the given position in the file.
|
unlock | public boolean unlock()(Code) | | |
write | abstract public void write(byte[] buffer, int offset, int length) throws IOException(Code) | | Writes a block starting from the current file pointer.
|
write | abstract public void write(long fileOffset, byte[] buffer, int offset, int length) throws IOException(Code) | | Writes a block to a given location.
|
write | abstract public void write(int b) throws IOException(Code) | | Write a byte to the file, advancing the pointer.
|
|
|