|
" 2013 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.Packet
com.sun.squawk.debugger.CommandPacket
public final class CommandPacket
A CommandPacket
encapsulates a JDWP command packet.
Field Summary |
---|
Fields inherited from class com.sun.squawk.debugger.Packet |
---|
FLAG_NEEDS_REPLY, FLAG_REPLY |
Constructor Summary | |
---|---|
CommandPacket(int set,
int command,
boolean needsReply)
Creates a packet to send a new command packet. |
|
CommandPacket(int id,
int dataLength,
DataInputStream data,
int set,
int command,
boolean needsReply)
Creates a packet to encapsulate a received JDWP command packet. |
Method Summary | |
---|---|
int |
command()
|
ReplyPacket |
createReply(int errorCode)
Creates a packet to send a reply for this command. |
int |
getFlags()
Gets the value for the 'flags' field in the header of this packet. |
ReplyPacket |
getReply()
Gets the reply to this sent command packet. |
boolean |
needsReply()
|
int |
set()
|
String |
toString()
Returns a string representation of the object. |
static String |
toString(int set,
int command)
Gets the identifier for a given JDWP command. |
protected void |
writeFields(DataOutputStream dos)
Write the set and command fields to dos |
Methods inherited from class com.sun.squawk.debugger.Packet |
---|
appendData, getID, getInputStream, getOutputStream, getSize, write |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CommandPacket(int set, int command, boolean needsReply)
owner
- the owner of the new packetset
- the JDWP command set constantcommand
- the JDWP command constantpublic CommandPacket(int id, int dataLength, DataInputStream data, int set, int command, boolean needsReply) throws IOException
owner
- the JDWPListener that received the packetid
- the identifier in the command packetdataLength
- the length of the data to read from data
data
- the contents of the data field of the packetset
- the JDWP command set constantcommand
- the JDWP command constant
IOException
Method Detail |
---|
public int set()
public int command()
public ReplyPacket createReply(int errorCode)
errorCode
- the JDWP error code to return in the reply
public final boolean needsReply()
public int getFlags()
getFlags
in class Packet
public ReplyPacket getReply()
protected void writeFields(DataOutputStream dos) throws IOException
set
and command
fields to dos
writeFields
in class Packet
dos
- DataOutputStream
IOException
public static String toString(int set, int command)
set
- a command setcommand
- a command with set
public String toString()
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString
in class Packet
|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |