public interface Buffer| Modifier and Type | Method and Description |
|---|---|
InputStream | getInputStream()Get an InputStream for reading from this buffer. |
int | getLength()Get the length of data in this buffer. |
int | getOffset()Get the offset into the underlying data. |
OutputStream | getOutputStream()Get an OutputStream for writing to this buffer. |
void | readComplete(boolean success)Top-level reader MUST call this to close the input stream. |
void | writeComplete(boolean success)Writer MUST call this when done. |
InputStream getInputStream() throws IOException
IOException - on I/O errorint getLength()
int getOffset()
OutputStream getOutputStream() throws IOException
IOException - on I/O errorvoid readComplete(boolean success)
success - if false, the read is considered failedvoid writeComplete(boolean success)
success - if false, deletes any resources