public class InputBuffer extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
_valid |
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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(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.
|
String |
unpackString()
Unpack a String from the stream.
|
boolean |
valid()
Is the buffer valid?
|
public InputBuffer()
public InputBuffer(byte[] b)
public InputBuffer(InputBuffer buff)
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 IOException
IOException
public final byte[] unpackBytes() throws IOException
IOException
public final boolean unpackBoolean() throws IOException
IOException
public final char unpackChar() throws IOException
IOException
public final short unpackShort() throws IOException
IOException
public final int unpackInt() throws IOException
IOException
public final long unpackLong() throws IOException
IOException
public final float unpackFloat() throws IOException
IOException
public final double unpackDouble() throws IOException
IOException
public final String unpackString() throws IOException
IOException
public void unpackFrom(InputBuffer buff) throws IOException
IOException
public final boolean reread()
public void print(PrintWriter strm)
Copyright © 2017 JBoss by Red Hat. All rights reserved.