public class Asn1Decoder extends Object implements TLVBerDecoderMBean
Constructor and Description |
---|
Asn1Decoder()
A public constructor of an Asn1 Decoder.
|
Modifier and Type | Method and Description |
---|---|
void |
allowIndefiniteLength()
Allow indefinite length.
|
void |
decode(ByteBuffer stream,
Asn1Container container)
The decoder main function.
|
void |
disallowIndefiniteLength()
Disallow indefinite length.
|
int |
getMaxLengthLength()
Get the length's Length.
|
int |
getMaxTagLength()
Get the maximum Tag's length
|
boolean |
isIndefiniteLengthAllowed()
Tells if indefinite length form could be used for Length
|
void |
setMaxLengthLength(int maxLengthLength)
Set the number of bytes that can be used to encode the Value length,
including the first byte.
|
void |
setMaxTagLength(int maxTagLength)
Set the maximum Tag length
|
public Asn1Decoder()
public void decode(ByteBuffer stream, Asn1Container container) throws DecoderException
stream
- The ByteBuffer containing the PDU to decodecontainer
- The container that store the state, the result
and other elements.DecoderException
- Thrown if anything went wrong!public int getMaxLengthLength()
getMaxLengthLength
in interface TLVBerDecoderMBean
public int getMaxTagLength()
getMaxTagLength
in interface TLVBerDecoderMBean
public void disallowIndefiniteLength()
disallowIndefiniteLength
in interface TLVBerDecoderMBean
public void allowIndefiniteLength()
allowIndefiniteLength
in interface TLVBerDecoderMBean
public boolean isIndefiniteLengthAllowed()
isIndefiniteLengthAllowed
in interface TLVBerDecoderMBean
true
if the current decoder support
indefinite lengthpublic void setMaxLengthLength(int maxLengthLength) throws DecoderException
setMaxLengthLength
in interface TLVBerDecoderMBean
maxLengthLength
- the number of byte to useDecoderException
- Thrown if the indefinite length is
allowed or if the length's Length is above 126 bytespublic void setMaxTagLength(int maxTagLength)
setMaxTagLength
in interface TLVBerDecoderMBean
maxTagLength
- The tagLength to set.Copyright © 2003-2014 The Apache Software Foundation. All Rights Reserved.