"

2013 FRC Java API

"

com.sun.squawk.debugger
Class ReplyPacket

java.lang.Object
  extended by com.sun.squawk.debugger.Packet
      extended by com.sun.squawk.debugger.ReplyPacket

public final class ReplyPacket
extends Packet

A ReplyPacket encapsulates a JDWP reply packet.


Field Summary
 
Fields inherited from class com.sun.squawk.debugger.Packet
FLAG_NEEDS_REPLY, FLAG_REPLY
 
Constructor Summary
ReplyPacket(CommandPacket command, int errorCode)
          Creates a packet to send a reply to a command packet.
ReplyPacket(int id, int dataLength, DataInputStream data, int errorCode)
          Creates a packet to encapsulate a received JDWP reply packet.
 
Method Summary
 int getErrorCode()
           
 int getFlags()
          Gets the value for the 'flags' field in the header of this packet.
 String toString()
          Returns a string representation of the object.
 void updateErrorCode(int errorCode)
           
protected  void writeFields(DataOutputStream dos)
          Hook for sublasses to write their specific fields to a packet being sent.
 
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

ReplyPacket

public ReplyPacket(CommandPacket command,
                   int errorCode)
Creates a packet to send a reply to a command packet.

Parameters:
command - the packet to which this is a reply
errorCode - the error code of the reply

ReplyPacket

public ReplyPacket(int id,
                   int dataLength,
                   DataInputStream data,
                   int errorCode)
            throws IOException
Creates a packet to encapsulate a received JDWP reply packet.

Parameters:
id - the identifier in the reply
dataLength - the length of the data to read from data
data - the contents of the data field of the packet
errorCode - the error code
Throws:
IOException
Method Detail

updateErrorCode

public void updateErrorCode(int errorCode)

writeFields

protected void writeFields(DataOutputStream dos)
                    throws IOException
Hook for sublasses to write their specific fields to a packet being sent.

Specified by:
writeFields in class Packet
Parameters:
dos - the stream to write the fields to
Throws:
IOException - if an IO error occurs

getErrorCode

public int getErrorCode()
Returns:
the value of this reply's error code

getFlags

public int getFlags()
Description copied from class: Packet
Gets the value for the 'flags' field in the header of this packet.

Specified by:
getFlags in class Packet

toString

public String toString()
Returns a string representation of the object. In general, the 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())
 

Specified by:
toString in class Packet
Returns:
a string representation of the object.

"

2013 FRC Java API

"

"
For updated information see the Java FRC site
"