Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.act365.net.icmp
Class ICMPWriter  view ICMPWriter download ICMPWriter.java

java.lang.Object
  extended bycom.act365.net.icmp.ICMPWriter

public class ICMPWriter
extends java.lang.Object

ICMPWriter writes ICMPMessage objects to a byte stream.


Field Summary
(package private)  short counter
           
(package private)  short identifier
           
 
Constructor Summary
ICMPWriter(short identifier)
          Creates a writer to write to DatagramPacket objects.
 
Method Summary
 byte[] write(byte type, byte code, byte[] data)
          Builds a full ICMPMessage object and writes it to a buffer.
(package private) static byte[] write(ICMPMessage message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

identifier

short identifier

counter

short counter
Constructor Detail

ICMPWriter

public ICMPWriter(short identifier)
Creates a writer to write to DatagramPacket objects. The identifier will appear in the transmitted datagram packet in modified form in order to enable any reply to be associated with the sender. Typically, the field might be populated with a short generated from the hash code of the transmitting object.

Method Detail

write

static byte[] write(ICMPMessage message)

write

public byte[] write(byte type,
                    byte code,
                    byte[] data)
Builds a full ICMPMessage object and writes it to a buffer.