|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openorb.io.StorageBuffer
A storage buffer holds binary data for further processing. MarshalBuffers and BufferSource objects output a stream of StorageBuffers.
Constructor Summary | |
StorageBuffer(byte[] buf,
int off,
int len)
Public constructor, Create storage buffer from bytes. |
|
StorageBuffer(byte[] buf,
int off,
int len,
java.io.InputStream is,
int total_len)
Public constructor, read part from buffer and remainder from stream. |
|
StorageBuffer(java.io.InputStream is,
int total_len)
public constructor, read from stream. |
Method Summary | |
int |
available()
Available bytes |
boolean |
isReadWriteMode()
Check if the buffer is in read write mode. |
byte[] |
linearize()
Move the entire buffer into a single byte array. |
boolean |
mark()
Mark current buffer position for future reset. |
int |
next(OctetSeqHolder buf,
IntHolder off,
IntHolder len)
Read the next piece of the buffer. |
boolean |
reset()
reset buffer position to position marked with mark operation. |
void |
setReadWriteMode(boolean readWriteMode)
Set read write mode. |
int |
skip(IntHolder len)
Skip over bytes. |
void |
writeTo(java.io.OutputStream os)
Writes entire buffer to output stream. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StorageBuffer(byte[] buf, int off, int len)
public StorageBuffer(java.io.InputStream is, int total_len) throws java.io.IOException
public StorageBuffer(byte[] buf, int off, int len, java.io.InputStream is, int total_len) throws java.io.IOException
buf
- Prefix bytes. Copied.off
- Offset into prefix buffer.len
- Length of data in prefix buffer.is
- Input stream for remainder of data.total_len
- total length including data from prexix and stream.Method Detail |
public int available()
public void writeTo(java.io.OutputStream os) throws java.io.IOException
public int next(OctetSeqHolder buf, IntHolder off, IntHolder len)
buf
- Out parameter, holds pointer to scratch space on return.off
- Out parameter, holds buffer offset on return.len
- InOut parameter, Length of requested buffer. Holds
unallocated length on return. (ie: original - return)public int skip(IntHolder len)
len
- InOut parameter, Length of requested skip. Holds
unskipped length on return. (ie: original - return)public byte[] linearize()
public boolean isReadWriteMode()
public void setReadWriteMode(boolean readWriteMode)
public boolean mark()
public boolean reset()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |