Constructor | Description |
---|---|
MemoryBuffer() |
|
MemoryBuffer(int size) |
Modifier and Type | Method | Description |
---|---|---|
byte[] |
getContent() |
|
InputStream |
getInputStream() |
|
int |
getLength() |
Current size.
|
int |
getOffset() |
|
OutputStream |
getOutputStream() |
|
void |
readComplete(boolean success) |
Top-level reader MUST call this to close the input stream.
|
String |
toString() |
|
void |
writeComplete(boolean success) |
Deletes the data if success is false
|
public InputStream getInputStream() throws IOException
getInputStream
in interface Buffer
IOException
public OutputStream getOutputStream()
getOutputStream
in interface Buffer
public void readComplete(boolean success)
Buffer
readComplete
in interface Buffer
public void writeComplete(boolean success)
writeComplete
in interface Buffer
success
- if false, deletes any resourcespublic byte[] getContent()