com.act365.net.icmp
Class ICMPWriter

java.lang.Object
  |
  +--com.act365.net.icmp.ICMPWriter

public class ICMPWriter
extends java.lang.Object

ICMPWriter writes ICMPMessage objects to a byte stream.


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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

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