|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mckoi.store.StreamFile
public class StreamFile
A RandomAccessFile that acts as an OutputStream, and can also be read as an InputStream.
Constructor Summary | |
---|---|
StreamFile(java.io.File file,
java.lang.String mode)
Constructor. |
Method Summary | |
---|---|
void |
close()
Closes the file. |
void |
delete()
Deletes the file. |
java.io.InputStream |
getInputStream()
Returns an InputStream to the file that allows us to read from the start to the end of the file. |
java.io.OutputStream |
getOutputStream()
Opens an OutputStream to the file. |
long |
length()
Returns the current length of the data. |
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. |
void |
synch()
Synchs the file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamFile(java.io.File file, java.lang.String mode) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void close() throws java.io.IOException
java.io.IOException
public void synch() throws java.io.IOException
java.io.IOException
public void delete() throws java.io.IOException
java.io.IOException
public void readFully(long position, byte[] buf, int off, int len) throws java.io.IOException
java.io.IOException
public long length()
public java.io.OutputStream getOutputStream() throws java.io.IOException
java.io.IOException
public java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |