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 actual maximum number of bytes that can be used to encode the
Length
|
int |
getMaxTagLength()
Get the actual maximum number of bytes that can be used to encode the Tag
|
boolean |
isIndefiniteLengthAllowed()
Tell 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 number of bytes that should be used to encode a Tag
label, including the first byte.
|
public void decode(ByteBuffer stream, Asn1Container container) throws org.apache.directory.api.asn1.DecoderException
stream - The ByteBuffer containing the PDU to decodecontainer - The container that store the state, the result
and other elements.org.apache.directory.api.asn1.DecoderException - Thrown if anything went wrong!public int getMaxLengthLength()
getMaxLengthLength in interface TLVBerDecoderMBeanpublic int getMaxTagLength()
getMaxTagLength in interface TLVBerDecoderMBeanpublic void disallowIndefiniteLength()
disallowIndefiniteLength in interface TLVBerDecoderMBeanpublic void allowIndefiniteLength()
allowIndefiniteLength in interface TLVBerDecoderMBeanpublic boolean isIndefiniteLengthAllowed()
isIndefiniteLengthAllowed in interface TLVBerDecoderMBeantrue if the Indefinite form is allowedpublic void setMaxLengthLength(int maxLengthLength)
throws org.apache.directory.api.asn1.DecoderException
setMaxLengthLength in interface TLVBerDecoderMBeanmaxLengthLength - the number of byte to useorg.apache.directory.api.asn1.DecoderException - Thrown if the indefinite length is
allowed or if the length's Length is above 126 bytespublic void setMaxTagLength(int maxTagLength)
setMaxTagLength in interface TLVBerDecoderMBeanmaxTagLength - The length to useCopyright © 2003–2015 The Apache Software Foundation. All rights reserved.