BufferGzipFileBufferpublic class FileBuffer extends Object implements Buffer
| Modifier and Type | Field | Description |
|---|---|---|
protected File |
_file |
|
protected int |
_offset |
|
protected int |
_sublen |
| Constructor | Description |
|---|---|
FileBuffer(File file) |
|
FileBuffer(File file,
int offset,
int sublen) |
| Modifier and Type | Method | Description |
|---|---|---|
File |
getFile() |
|
InputStream |
getInputStream() |
Caller must call readComplete()
|
int |
getLength() |
Always valid if file exists
|
int |
getOffset() |
Always valid
|
OutputStream |
getOutputStream() |
Caller must call writeComplete()
|
void |
readComplete(boolean success) |
Top-level reader MUST call this to close the input stream.
|
String |
toString() |
|
void |
writeComplete(boolean success) |
Deletes the file if success is false
|
protected final File _file
protected final int _offset
protected final int _sublen
public FileBuffer(File file)
public FileBuffer(File file, int offset, int sublen)
public File getFile()
public InputStream getInputStream() throws IOException
getInputStream in interface BufferIOExceptionpublic OutputStream getOutputStream() throws IOException
getOutputStream in interface BufferIOExceptionpublic void readComplete(boolean success)
BufferreadComplete in interface Bufferpublic void writeComplete(boolean success)
writeComplete in interface Buffersuccess - if false, deletes any resourcespublic int getLength()