|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jnetstream.protocol.NullHeader
public class NullHeader
An empty, no action, stub stand-in. All methods throw
UnsupportedOperationException.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jnetstream.packet.Header |
|---|
Header.DynamicProperty, Header.StaticProperty |
| Nested classes/interfaces inherited from interface com.slytechs.utils.namespace.Named |
|---|
com.slytechs.utils.namespace.Named.Util |
| Constructor Summary | |
|---|---|
NullHeader()
|
|
| Method Summary | ||
|---|---|---|
Field<?>[] |
getAllFields()
|
|
Header[] |
getAllHeaders()
|
|
com.slytechs.utils.memory.BitBuffer |
getBuffer()
Returns buffer containing the header's data. |
|
|
getField(java.lang.Class<T> c)
|
|
|
getField(DataField field)
Retrieves field's runtime environment. |
|
DataField |
getFieldConstant()
|
|
int |
getLength()
Returns the length of this header in bytes. |
|
java.lang.String |
getName()
Returns the NPL name of this header. |
|
int |
getOffset()
Position or offset from the start of the packet buffer this buffer belongs to. |
|
|
getProperty(Header.DynamicProperty key)
|
|
|
getProperty(Header.StaticProperty key)
|
|
|
getProperty(java.lang.String name)
|
|
Protocol |
getProtocol()
|
|
java.lang.Class<? extends Header> |
getType()
|
|
boolean |
isTruncated()
Tells if this header has been truncated or if all of the headers contents are contained within the packet buffer. |
|
java.util.Iterator<HeaderElement> |
iterator()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NullHeader()
| Method Detail |
|---|
public com.slytechs.utils.memory.BitBuffer getBuffer()
throws java.io.IOException
HeadergetPosition(), getPosition() + getLength()
and getPosition() +
getLength() respectively. No new data is
allocated and any changes to the returned header buffer are also reflected
in the backing packet buffer.
getBuffer in interface Headerjava.io.IOException
public <T extends Field<?>> T getField(java.lang.Class<T> c)
throws CodecException,
java.io.IOException
CodecException
java.io.IOExceptionpublic int getLength()
Header
getLength in interface Headerpublic java.lang.String getName()
Header
getName in interface com.slytechs.utils.namespace.NamedgetName in interface Headerpublic int getOffset()
Header
getOffset in interface Headerpublic <T> T getProperty(Header.StaticProperty key)
getProperty in interface Headerpublic <T> T getProperty(Header.DynamicProperty key)
getProperty in interface Headerpublic java.lang.Class<? extends Header> getType()
getType in interface Header
public boolean isTruncated()
throws java.io.IOException
Header
isTruncated in interface Headerjava.io.IOExceptionpublic <T> T getProperty(java.lang.String name)
getProperty in interface Headerpublic Protocol getProtocol()
getProtocol in interface Headerpublic Field<?>[] getAllFields()
getAllFields in interface Headerpublic Header[] getAllHeaders()
getAllHeaders in interface Headerpublic java.util.Iterator<HeaderElement> iterator()
iterator in interface java.lang.Iterable<HeaderElement>
public <T> Field<T> getField(DataField field)
throws CodecException,
java.io.IOException
Header
getField in interface HeaderT - value type of the field
CodecException
java.io.IOExceptionpublic DataField getFieldConstant()
getFieldConstant in interface HeaderElement
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||