Package i2p.susi.util
Interface Buffer
-
- All Known Implementing Classes:
FileBuffer,GzipFileBuffer,MemoryBuffer,OutputStreamBuffer,ReadBuffer
public interface BufferBase interface for all Buffers. Data may only be read or written via streams, unless implemented via additional methods in subclasses.- Since:
- 0.9.34
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStreamgetInputStream()intgetLength()intgetOffset()OutputStreamgetOutputStream()voidreadComplete(boolean success)Top-level reader MUST call this to close the input stream.voidwriteComplete(boolean success)Writer MUST call this when done.
-
-
-
Method Detail
-
getInputStream
InputStream getInputStream() throws IOException
- Throws:
IOException
-
getOutputStream
OutputStream getOutputStream() throws IOException
- Throws:
IOException
-
readComplete
void readComplete(boolean success)
Top-level reader MUST call this to close the input stream.
-
writeComplete
void writeComplete(boolean success)
Writer MUST call this when done.- Parameters:
success- if false, deletes any resources
-
getLength
int getLength()
-
getOffset
int getOffset()
-
-