Package org.apache.kerby.xdr.type
Interface XdrType
- All Known Implementing Classes:
AbstractXdrType,XdrBoolean,XdrBytes,XdrEnumerated,XdrInteger,XdrLong,XdrSimple,XdrString,XdrStructType,XdrUnion,XdrUnsignedInteger
public interface XdrType
The ASN1 type interface for all ASN1 types.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddecode(byte[] content) Decode the content bytes into this type.voiddecode(ByteBuffer content) Decode the content bytes into this type.byte[]encode()Encode the type, by recursively.voidencode(ByteBuffer buffer) Encode the type, by recursively, using the provided buffer.intGet length of encoding bytes by just calculating without real encoding.
-
Method Details
-
encodingLength
Get length of encoding bytes by just calculating without real encoding. Generally it's called to prepare for the encoding buffer.- Returns:
- length of encoding bytes
- Throws:
IOException- e
-
encode
Encode the type, by recursively.- Returns:
- encoded bytes
- Throws:
IOException- e
-
encode
Encode the type, by recursively, using the provided buffer.- Parameters:
buffer- The byte buffer- Throws:
IOException- e
-
decode
Decode the content bytes into this type.- Parameters:
content- The content bytes- Throws:
IOException- e
-
decode
Decode the content bytes into this type.- Parameters:
content- The content bytes- Throws:
IOException- e
-