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. |
(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 |
identifier
short identifier
counter
short counter
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.
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.