-
public final class Asn1Node.BuilderThis class is used to build an Asn1Node instance of a constructed tag. This class is notthread-safe.
-
-
Method Summary
Modifier and Type Method Description Asn1Node.BuilderaddChild(Asn1Node child)Adds a child from an existing node. Asn1Node.BuilderaddChild(Asn1Node.Builder child)Adds a child from another builder. Asn1Node.BuilderaddChildren(Array<byte> encodedBytes)Adds children from bytes. Asn1Node.BuilderaddChildAsInteger(int tag, int value)Adds a child of non-constructed tag with an integer as the data. Asn1Node.BuilderaddChildAsString(int tag, String value)Adds a child of non-constructed tag with a string as the data. Asn1Node.BuilderaddChildAsBytes(int tag, Array<byte> value)Adds a child of non-constructed tag with a byte array as the data. Asn1Node.BuilderaddChildAsBytesFromHex(int tag, String hex)Adds a child of non-constructed tag with a byte array as the data from a hex string. Asn1Node.BuilderaddChildAsBits(int tag, int value)Adds a child of non-constructed tag with bits as the data. Asn1Node.BuilderaddChildAsBoolean(int tag, boolean value)Adds a child of non-constructed tag with a boolean as the data. Asn1Nodebuild()Builds the node. -
-
Method Detail
-
addChild
Asn1Node.Builder addChild(Asn1Node child)
Adds a child from an existing node.
-
addChild
Asn1Node.Builder addChild(Asn1Node.Builder child)
Adds a child from another builder. The child will be built with the call to this method,and any changes to the child builder after the call to this method doesn't have effect.
-
addChildren
Asn1Node.Builder addChildren(Array<byte> encodedBytes)
Adds children from bytes. This method calls Asn1Decoder to verify the
{@code * encodedBytes}and adds all nodes parsed from it as children.
-
addChildAsInteger
Asn1Node.Builder addChildAsInteger(int tag, int value)
Adds a child of non-constructed tag with an integer as the data.
-
addChildAsString
Asn1Node.Builder addChildAsString(int tag, String value)
Adds a child of non-constructed tag with a string as the data.
-
addChildAsBytes
Asn1Node.Builder addChildAsBytes(int tag, Array<byte> value)
Adds a child of non-constructed tag with a byte array as the data.
- Parameters:
value- The value will be owned by this node.
-
addChildAsBytesFromHex
Asn1Node.Builder addChildAsBytesFromHex(int tag, String hex)
Adds a child of non-constructed tag with a byte array as the data from a hex string.
-
addChildAsBits
Asn1Node.Builder addChildAsBits(int tag, int value)
Adds a child of non-constructed tag with bits as the data.
-
addChildAsBoolean
Asn1Node.Builder addChildAsBoolean(int tag, boolean value)
Adds a child of non-constructed tag with a boolean as the data.
-
-
-
-