public interface Asn1Type
| Modifier and Type | Interface and Description |
|---|---|
static class |
Asn1Type.EncodingType
Encoding type
|
| Modifier and Type | Method and Description |
|---|---|
void |
decode(byte[] content)
Decode the content bytes into this type.
|
void |
decode(ByteBuffer content)
Decode the content bytes into this type.
|
byte[] |
encode()
Encode the type, by recursively.
|
void |
encode(ByteBuffer buffer)
Encode the type, by recursively, using the provided buffer.
|
int |
encodingLength()
Get length of encoding bytes by just calculating without real encoding.
|
boolean |
isBER()
Tells if it's is BER
|
boolean |
isCER()
Tells if it's is CER
|
boolean |
isDefinitiveLength()
Tells if it's definitive length or not.
|
boolean |
isDER()
Tells if it's is DER
|
boolean |
isImplicit()
Tells if it's is IMPLICIT or not.
|
boolean |
isPrimitive()
Tells if it is PRIMITIVE or not.
|
Tag |
tag() |
void |
taggedDecode(byte[] content,
TaggingOption taggingOption)
Decode the content bytes into this type as it's tagged with the provided
tagging option.
|
void |
taggedDecode(ByteBuffer content,
TaggingOption taggingOption)
Decode the content bytes into this type as it's tagged with the provided
tagging option.
|
void |
taggedEncode(ByteBuffer buffer,
TaggingOption taggingOption)
Tag and encode this type using the provided tagging option.
|
byte[] |
taggedEncode(TaggingOption taggingOption)
Tag and encode this type using the provided tagging option.
|
void |
useBER()
Set encoding type as BER.
|
void |
useCER()
Set encoding type as CER.
|
void |
useDefinitiveLength(boolean isDefinitiveLength)
Use definitive length or not.
|
void |
useDER()
Set encoding type as DER.
|
void |
useImplicit(boolean isImplicit)
Use implicit or not.
|
void |
usePrimitive(boolean isPrimitive)
Use primitive or constructed.
|
Tag tag()
void usePrimitive(boolean isPrimitive)
boolean isPrimitive()
void useDefinitiveLength(boolean isDefinitiveLength)
boolean isDefinitiveLength()
void useImplicit(boolean isImplicit)
boolean isImplicit()
void useDER()
boolean isDER()
void useBER()
boolean isBER()
void useCER()
boolean isCER()
int encodingLength()
throws IOException
IOExceptionbyte[] encode()
throws IOException
IOExceptionvoid encode(ByteBuffer buffer) throws IOException
buffer - The byte bufferIOExceptionvoid decode(byte[] content)
throws IOException
content - The content bytesIOException - evoid decode(ByteBuffer content) throws IOException
content - The content bytesIOException - ebyte[] taggedEncode(TaggingOption taggingOption) throws IOException
taggingOption - The tagging optionIOExceptionvoid taggedEncode(ByteBuffer buffer, TaggingOption taggingOption) throws IOException
buffer - The byte buffertaggingOption - The tagging optionIOExceptionvoid taggedDecode(ByteBuffer content, TaggingOption taggingOption) throws IOException
TaggingOptioncontent - The content bytestaggingOption - The tagging optionIOException - evoid taggedDecode(byte[] content,
TaggingOption taggingOption)
throws IOException
TaggingOptioncontent - The content bytestaggingOption - The tagging optionIOException - eCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.