This class encapsulates JDWP packet. It based on
ByteBuffer but adds methods for working with data
specific for JDWP packet. This class is not used directly, its subclasses
Command and Reply are used instead. For
information about JDWP packet see JDWP specification.
See Also:jdwp.ByteBuffer See Also:jdwp.Command See Also:jdwp.Reply
Field Summary
final public static int
CommandOffset Offset of the "command number" field in the JDWP packet.
final public static int
ErrorCodeOffset Offset of the "error code" field in the JDWP packet.
final public static int
FlagsOffset Offset of the "flags" field in the JDWP packet.
final public static int
IdOffset Offset of the "packet ID" field in the JDWP packet.
final public static int
LengthOffset Offset of the "packet length" field in the JDWP packet.
Tries to read next field ID from the buffer.
Value is read is one
that is pointed by reading marker. After completing the operation
the reading marker is incremented.
current field ID from the buffer throws: BoundException - if value to be read is outside the filled area
Tries to read next frame ID from the buffer.
Value is read is one
that is pointed by reading marker. After completing the operation
the reading marker is incremented.
current frame ID from the buffer throws: BoundException - if value to be read is outside the filled area
Tries to read next method ID from the buffer.
Value is read is one
that is pointed by reading marker. After completing the operation
the reading marker is incremented.
current method ID from the buffer throws: BoundException - if value to be read is outside the filled area
Tries to read next object ID from the buffer.
Value is read is one
that is pointed by reading marker. After completing the operation
the reading marker is incremented.
current object ID from the buffer throws: BoundException - if value to be read is outside the filled area
Tries to read next reference type ID from the buffer.
Value is read is one
that is pointed by reading marker. After completing the operation
the reading marker is incremented.
current reference type ID from the buffer throws: BoundException - if value to be read is outside the filled area
Parses the JDWP packet according to the specified mask. The mask
specifies what elements are contained in JDWP packet's data. The rules
are as follows:
b - a byte value
i - an int value
S - a short value
l - a long value
s - a string value
f - a field ID
m - a method ID
o - an object ID
r - a reference type ID
F - a frame ID
v - a value. The first byte indicates type tag of the
variable, the second is a variable's value.
. - a set of data in the end of packet that should not be parsed.
i(<submask>) - the first integer indicates how many times
submask is appeared in the packet.
For example, the mask li(rm) means that the first element
of packet's data is a long value, then an int
value that indicates how many times the pair "reference type ID -
method ID" is appeared later.
Parameters: how - a mask that indicates how to parse a packet. a vector of parsed elements of the packet's data. The classesthat represent different types of elements are written below:
b - java.lang.Integer
i - java.lang.Integer
S - java.lang.Integer
l - java.lang.Long
s - java.lang.String
f - java.lang.Long
m - java.lang.Long
o - java.lang.Long
r - java.lang.Long
F - java.lang.Long
v - The tag of the value is represented byjava.lang.Integer. The value itself is representedaccording to this table