|
2010 FRC Java API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.squawk.debugger.PacketInputStream
public class PacketInputStream
A PacketInputStream is used to read data from the data part of a Packet
.
Constructor Summary | |
---|---|
|
PacketInputStream(DataInputStream dis)
|
protected |
PacketInputStream(PacketInputStream inner)
|
Method Summary | |
---|---|
void |
close()
Closes this stream and its underlying stream. |
DataInputStream |
getInputStream()
Get the underlying inputstream for sniffing purposes |
boolean |
readBoolean(String s)
Reads a boolean value from this stream. |
byte |
readByte(String s)
Reads one byte from this stream. |
char |
readChar(String s)
Reads a char value from this stream. |
double |
readDouble(String s)
Reads a double value from this stream. |
DataType.FieldID |
readFieldID(String s)
|
float |
readFloat(String s)
Reads a float value from this stream. |
DataType.FrameID |
readFrameID(String s)
|
int |
readInt(String s)
Reads an int value from this stream. |
DataType.Location |
readLocation(String s)
|
long |
readLong(String s)
Reads a long value from this stream. |
DataType.MethodID |
readMethodID(String s)
|
DataType.ObjectID |
readObjectID(String s)
|
DataType.ReferenceTypeID |
readReferenceTypeID(String s)
|
short |
readShort(String s)
Reads a short value from this stream. |
String |
readString(String s)
Reads from the stream a representation of a Unicode character string encoded in Java modified UTF-8 format; this string of characters is then returned as a String . |
DataType.TaggedObjectID |
readTaggedObjectID(String s)
|
int |
skipBytes(int n)
Attempts to skip over n bytes in the stream. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected PacketInputStream(PacketInputStream inner)
public PacketInputStream(DataInputStream dis)
Method Detail |
---|
public void close() throws IOException
IOException
public final DataInputStream getInputStream()
public final boolean readBoolean(String s) throws IOException
s
- prefix to use if this read is logged. A value of null prevents logging altogether.
boolean
value read.
IOException
- if there was an IO error while readingpublic final byte readByte(String s) throws IOException
s
- prefix to use if this read is logged. A value of null prevents logging altogether.
-1
if the end of the
stream is reached.
IOException
- if there was an IO error while readingpublic final char readChar(String s) throws IOException
s
- prefix to use if this read is logged. A value of null prevents logging altogether.
IOException
- if there was an IO error while readingpublic final double readDouble(String s) throws IOException
s
- prefix to use if this read is logged. A value of null prevents logging altogether.
IOException
- if there was an IO error while readingpublic DataType.FieldID readFieldID(String s) throws IOException
IOException
public final float readFloat(String s) throws IOException
s
- prefix to use if this read is logged. A value of null prevents logging altogether.
IOException
- if there was an IO error while readingpublic DataType.FrameID readFrameID(String s) throws IOException
IOException
public final int readInt(String s) throws IOException
s
- prefix to use if this read is logged. A value of null prevents logging altogether.
int
.
IOException
- if there was an IO error while readingpublic DataType.Location readLocation(String s) throws IOException
IOException
public final long readLong(String s) throws IOException
s
- prefix to use if this read is logged. A value of null prevents logging altogether.
long
.
IOException
- if there was an IO error while readingpublic DataType.MethodID readMethodID(String s) throws IOException
IOException
public DataType.ObjectID readObjectID(String s) throws IOException
IOException
public DataType.ReferenceTypeID readReferenceTypeID(String s) throws IOException
IOException
public final short readShort(String s) throws IOException
s
- prefix to use if this read is logged. A value of null prevents logging altogether.
IOException
- if there was an IO error while readingpublic final String readString(String s) throws IOException
String
.
The format of the string in the stream is the same as that for
DataInput
, but the characters are preceeded by a
4-byte length field.
s
- prefix to use if this read is logged. A value of null prevents logging altogether.
IOException
- if there was an IO error while readingpublic DataType.TaggedObjectID readTaggedObjectID(String s) throws IOException
IOException
public int skipBytes(int n) throws IOException
n
bytes in the stream.
n
- number of bytes to skip
IOException
- if there was an IO error while skipping
|
2010 FRC Java API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |