|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arjuna.ats.arjuna.state.InputBuffer
An InputBuffer is used to retrieve various Java types from a byte stream created using an OutputBuffer. Similar to java serialization. However, InputBuffers are compatible with OTSArjuna states.
Field Summary | |
protected boolean |
_valid
|
Constructor Summary | |
InputBuffer()
Create a new buffer. |
|
InputBuffer(byte[] b)
Create our own copy of the byte array. |
|
InputBuffer(InputBuffer buff)
Create a new buffer and copy the provided one. |
Method Summary | |
byte[] |
buffer()
Return the internal byte buffer. |
void |
copy(InputBuffer buff)
Copy the existing buffer. |
int |
length()
Return the length of the byte buffer. |
void |
print(java.io.PrintWriter strm)
Print information about this instance. |
boolean |
reread()
Reset the read pointer for this buffer. |
void |
setBuffer(byte[] b)
Set the buffer to be used by this instance. |
boolean |
unpackBoolean()
Unpack a boolean from the stream. |
byte |
unpackByte()
Unpack a byte from the stream. |
byte[] |
unpackBytes()
Unpack the next byte array from the stream. |
char |
unpackChar()
Unpack a character from the stream. |
double |
unpackDouble()
Unpack a double from the stream. |
float |
unpackFloat()
Unpack a float from the stream. |
void |
unpackFrom(InputBuffer buff)
Unpack a buffer from the provided buffer, and initialise this instance with it. |
int |
unpackInt()
Unpack an integer from the stream. |
long |
unpackLong()
Unpack a long from the stream. |
short |
unpackShort()
Unpack a short from the stream. |
java.lang.String |
unpackString()
Unpack a String from the stream. |
boolean |
valid()
Is the buffer valid? |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean _valid
Constructor Detail |
public InputBuffer()
public InputBuffer(byte[] b)
public InputBuffer(InputBuffer buff)
Method Detail |
public final boolean valid()
public void copy(InputBuffer buff)
public final int length()
public final byte[] buffer()
public final void setBuffer(byte[] b)
public final byte unpackByte() throws java.io.IOException
java.io.IOException
public final byte[] unpackBytes() throws java.io.IOException
java.io.IOException
public final boolean unpackBoolean() throws java.io.IOException
java.io.IOException
public final char unpackChar() throws java.io.IOException
java.io.IOException
public final short unpackShort() throws java.io.IOException
java.io.IOException
public final int unpackInt() throws java.io.IOException
java.io.IOException
public final long unpackLong() throws java.io.IOException
java.io.IOException
public final float unpackFloat() throws java.io.IOException
java.io.IOException
public final double unpackDouble() throws java.io.IOException
java.io.IOException
public final java.lang.String unpackString() throws java.io.IOException
java.io.IOException
public void unpackFrom(InputBuffer buff) throws java.io.IOException
java.io.IOException
public final boolean reread()
public void print(java.io.PrintWriter strm)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |