|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectTlvTools
Provides a set of utilites for working with TLV chains.
| Method Summary | |
static ImmutableTlvChain |
createChain(Tlv[] tlvs,
int offset,
int len)
Creates a new immutable TLV chain with the given number of TLV's starting from the given offset of the given TLV array. |
static MutableTlvChain |
createMutableChain()
Returns a new empty mutable TLV chain. |
static ImmutableTlvChain |
getImmutableCopy(TlvChain other)
Returns a copy of the given TLV chain that cannot be modified. |
static MutableTlvChain |
getMutableCopy(TlvChain other)
Returns a copy of the given TLV chain that can be modified. |
static boolean |
isCompleteTlvChain(ByteBlock block)
Returns whether the given block might be a valid, complete TLV chain. |
static ImmutableTlvChain |
readChain(ByteBlock block)
Reads a TLV chain from the given block of TLV's. |
static ImmutableTlvChain |
readChain(ByteBlock block,
int maxTlvs)
Reads a TLV chain from the given block of TLV's, stopping after reading the number of TLV's specified by maxTlvs. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static ImmutableTlvChain readChain(ByteBlock block)
readChain(block, -1). The total number of bytes read can be read by
calling the getTotalSize method of the returned
TlvChain.
block - the data block containing zero or more TLV's
public static ImmutableTlvChain readChain(ByteBlock block,
int maxTlvs)
maxTlvs. If
maxTlvs is -1, all possible TLV's are read. The
total number of bytes read can be read by calling the
getTotalSize method of the returned TlvChain.
block - block the data block containing zero or more TLV'smaxTlvs - the maximum number of TLV's to read, or -1 to
read all possible TLV's in the given block
public static ImmutableTlvChain createChain(Tlv[] tlvs,
int offset,
int len)
tlvs can be null.
tlvs - the list of (non-null) TLV'soffset - the index of the first TLV that this chain should containlen - the number of TLV's to include in this chain
public static MutableTlvChain createMutableChain()
public static MutableTlvChain getMutableCopy(TlvChain other)
other - the TLV chain to copy
public static ImmutableTlvChain getImmutableCopy(TlvChain other)
other - the TLV chain to copy
public static boolean isCompleteTlvChain(ByteBlock block)
block - a block of data that might contain a complete TLV chain
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||