org.opennms.protocols.ip
Class IPHeader.EndOfOptions
java.lang.Object
org.opennms.protocols.ip.IPHeader.Option
org.opennms.protocols.ip.IPHeader.EndOfOptions
- Enclosing class:
- IPHeader
- public static final class IPHeader.EndOfOptions
- extends IPHeader.Option
This class is used to represent the End-Of-Option
list in the IP header. After this option, the option list
is not processed any further.
- Author:
- Brian Weaver, OpenNMS
Constructor Summary |
IPHeader.EndOfOptions()
Constructs a new End-Of-Options list instance
that can be added or found in the IP header. |
Method Summary |
(package private) int |
bytesRequired()
Returns the number of bytes requried to represent this
option |
(package private) int |
writeBytes(byte[] dest,
int offset)
Converts the option to an array of bytes and writes
those bytes in to the destiantion buffer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IPHeader.EndOfOptions
public IPHeader.EndOfOptions()
- Constructs a new End-Of-Options list instance
that can be added or found in the IP header.
bytesRequired
int bytesRequired()
- Returns the number of bytes requried to represent this
option
- Specified by:
bytesRequired
in class IPHeader.Option
- Returns:
- The bytes used by this option
writeBytes
int writeBytes(byte[] dest,
int offset)
- Converts the option to an array of bytes and writes
those bytes in to the destiantion buffer. The bytes
are written startint at the offset passed to the method.
- Specified by:
writeBytes
in class IPHeader.Option
- Parameters:
dest
- The destiantion buffer to write the bytesoffset
- The offset to start writing in the buffer
- Returns:
- The offset plus the number of bytes written
to the buffer.
- Throws:
java.lang.ArrayIndexOutOfBounds
- Throws in there is
insufficient space in the buffer.
Generated by jpp on July 15 2004 1044.