|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgcspy.comm.BufferedInput
public class BufferedInput
Buffered input from a byte array The communication stream has the following wire format (b is a byte)
byte b ubyte b short bb ushort bb false 0 true 1 int bbbb string byte...byte0 len int array len item...item color ubyte ubyte ubyte
Constructor Summary | |
---|---|
BufferedInput(byte[] buffer,
int len)
Create a new buffer |
Method Summary | |
---|---|
void |
close()
Close the buffer |
boolean |
finished()
Have we reached the end of the input buffer? |
int |
readArrayLen()
Read the length of an array (which follows) from the buffer |
boolean |
readBoolean()
Read the next boolean from the input buffer |
byte |
readByte()
Return the next byte from the input buffer |
byte[] |
readByteArray()
Read an array from the buffer. |
java.awt.Color |
readColor()
Read a colour from the input buffer |
int |
readInt()
Read the next int from the input buffer. |
int[] |
readIntArray()
Read an array from the buffer. |
short |
readShort()
Read the next short from the input buffer |
short[] |
readShortArray()
Read an array from the buffer. |
java.lang.String |
readString()
Read the next 0-terminated string from the buffer |
short |
readUByte()
Read the nexct unsigned byte from the input buffer. |
short[] |
readUByteArray()
Read an array from the buffer. |
int |
readUShort()
Read the next short from the input buffer |
int[] |
readUShortArray()
Read an array from the buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BufferedInput(byte[] buffer, int len)
buffer
- The byte array bufferlen
- The buffer's lengthMethod Detail |
---|
public boolean finished()
public boolean readBoolean()
public byte readByte()
public short readUByte()
public short readShort()
public int readUShort()
public int readInt()
public java.lang.String readString()
public int readArrayLen()
public byte[] readByteArray()
public short[] readUByteArray()
public short[] readShortArray()
public int[] readUShortArray()
public int[] readIntArray()
public java.awt.Color readColor()
public void close()
a
- BufferedIOException if we haven't reached the end of the buffer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |