Package i2p.susi.util
Class GzipFileBuffer
java.lang.Object
i2p.susi.util.FileBuffer
i2p.susi.util.GzipFileBuffer
- All Implemented Interfaces:
Buffer
Gzip File implementation of Buffer.
- Since:
- 0.9.34
-
Field Summary
Fields inherited from class i2p.susi.util.FileBuffer
_file, _offset, _sublen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCaller must call readComplete()int
Returns the actual uncompressed size.Caller must call writeComplete()void
readComplete
(boolean success) Top-level reader MUST call this to close the input stream.toString()
void
writeComplete
(boolean success) Sets the length if success is trueMethods inherited from class i2p.susi.util.FileBuffer
getFile, getOffset
-
Constructor Details
-
GzipFileBuffer
-
GzipFileBuffer
-
-
Method Details
-
getInputStream
Description copied from class:FileBuffer
Caller must call readComplete()- Specified by:
getInputStream
in interfaceBuffer
- Overrides:
getInputStream
in classFileBuffer
- Returns:
- new FileInputStream
- Throws:
IOException
-
getOutputStream
Description copied from class:FileBuffer
Caller must call writeComplete()- Specified by:
getOutputStream
in interfaceBuffer
- Overrides:
getOutputStream
in classFileBuffer
- Returns:
- new FileOutputStream
- Throws:
IOException
-
readComplete
public void readComplete(boolean success) Description copied from interface:Buffer
Top-level reader MUST call this to close the input stream.- Specified by:
readComplete
in interfaceBuffer
- Overrides:
readComplete
in classFileBuffer
-
writeComplete
public void writeComplete(boolean success) Sets the length if success is true- Specified by:
writeComplete
in interfaceBuffer
- Overrides:
writeComplete
in classFileBuffer
- Parameters:
success
- if false, deletes any resources
-
getLength
public int getLength()Returns the actual uncompressed size. Only known after reading and calling readComplete(true), or after writing and calling writeComplete(true), oherwise returns 0.- Specified by:
getLength
in interfaceBuffer
- Overrides:
getLength
in classFileBuffer
-
toString
- Overrides:
toString
in classFileBuffer
-