public class StorageBuffer
extends java.lang.Object
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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(org.omg.CORBA.OctetSeqHolder buf,
org.omg.CORBA.IntHolder off,
org.omg.CORBA.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(org.omg.CORBA.IntHolder len)
Skip over bytes.
|
void |
writeTo(java.io.OutputStream os)
Writes entire buffer to output stream.
|
public StorageBuffer(byte[] buf,
int off,
int len)
public StorageBuffer(java.io.InputStream is,
int total_len)
throws java.io.IOException
java.io.IOExceptionpublic 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.java.io.IOExceptionpublic int available()
public void writeTo(java.io.OutputStream os)
throws java.io.IOException
java.io.IOExceptionpublic int next(org.omg.CORBA.OctetSeqHolder buf,
org.omg.CORBA.IntHolder off,
org.omg.CORBA.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(org.omg.CORBA.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()