public class StreamFile
extends java.lang.Object
| Constructor | Description |
|---|---|
StreamFile(java.io.File file,
java.lang.String mode) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
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.
|
public StreamFile(java.io.File file,
java.lang.String mode)
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOExceptionpublic void synch()
throws java.io.IOException
java.io.IOExceptionpublic void delete()
throws java.io.IOException
java.io.IOExceptionpublic void readFully(long position,
byte[] buf,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic long length()
public java.io.OutputStream getOutputStream()
throws java.io.IOException
java.io.IOExceptionpublic java.io.InputStream getInputStream()
throws java.io.IOException
java.io.IOExceptionCopyright © 2018. All rights reserved.