public abstract class TlvElement extends Object
This abstract implementation does not imply anything about the encoding of the identifier, length or value field. This is deferred to a concrete implementation, e.g. a ASN.1 DER implementation.
The TLV element is parsed from an associated TlvInputStream.
| Modifier and Type | Method and Description |
|---|---|
abstract TlvInputStream |
createTlvInputStream(byte[] pBytes,
int pOffset,
int pLength) |
byte[] |
getContent()
The data part within the TLV element.
|
byte |
getContentAt(int index)
A byte at index from the data part within the TLV element.
|
abstract byte[] |
getEncoded()
The whole, encoded TLV element.
|
int |
getIdentifier()
The identifier for this TLV element.
|
int |
getLength()
The length of the TLV elements data
|
TlvTemplate |
getTemplate()
|
abstract boolean |
isComposite()
true if this element contains TLV data itself. |
String |
toString() |
public abstract TlvInputStream createTlvInputStream(byte[] pBytes, int pOffset, int pLength)
public byte[] getContent()
public byte getContentAt(int index)
public abstract byte[] getEncoded()
public int getIdentifier()
An identifier may be made up of different components, see ASN.1.
public int getLength()
public TlvTemplate getTemplate() throws TlvFormatException
TlvTemplate if available.TlvFormatExceptionpublic abstract boolean isComposite()
true if this element contains TLV data itself.true if this element contains TLV data itself.Copyright © 2013 intarsys consulting GmbH. All Rights Reserved.