| java.lang.Object com.mckoi.store.StreamFile
StreamFile | public class StreamFile (Code) | | A RandomAccessFile that acts as an OutputStream, and can also be read as an
InputStream.
author: Tobias Downer |
Method Summary | |
public void | close() Closes the file. | public void | delete() Deletes the file. | public InputStream | getInputStream() Returns an InputStream to the file that allows us to read from the start
to the end of the file. | public OutputStream | getOutputStream() Opens an OutputStream to the file. | public long | length() Returns the current length of the data. | public void | readFully(long position, byte[] buf, int off, int len) Fully reads a block from a section of the file into the given byte[]
array at the given position. | public void | synch() Synchs the file. |
getInputStream | public InputStream getInputStream() throws IOException(Code) | | Returns an InputStream to the file that allows us to read from the start
to the end of the file.
|
getOutputStream | public OutputStream getOutputStream() throws IOException(Code) | | Opens an OutputStream to the file. Only one output stream may be open
on the file at once.
|
length | public long length()(Code) | | Returns the current length of the data.
|
readFully | public void readFully(long position, byte[] buf, int off, int len) throws IOException(Code) | | Fully reads a block from a section of the file into the given byte[]
array at the given position.
|
|
|