Class AbstractAsn1Writer

    • Constructor Detail

      • AbstractAsn1Writer

        protected AbstractAsn1Writer()
        Creates a new abstract ASN.1 writer.
    • Method Detail

      • writeBoolean

        public Asn1Writer writeBoolean​(boolean value)
                                throws IOException
        Description copied from interface: Asn1Writer
        Writes a boolean element using the Universal Boolean ASN.1 type tag.
        Specified by:
        writeBoolean in interface Asn1Writer
        Parameters:
        value - The boolean value.
        Returns:
        A reference to this ASN.1 writer.
        Throws:
        IOException - If an error occurs while writing the element.
      • writeEnumerated

        public Asn1Writer writeEnumerated​(int value)
                                   throws IOException
        Description copied from interface: Asn1Writer
        Writes an enumerated element using the Universal Enumerated ASN.1 type tag.
        Specified by:
        writeEnumerated in interface Asn1Writer
        Parameters:
        value - The enumerated value.
        Returns:
        A reference to this ASN.1 writer.
        Throws:
        IOException - If an error occurs while writing the element.
      • writeInteger

        public Asn1Writer writeInteger​(int value)
                                throws IOException
        Description copied from interface: Asn1Writer
        Writes an integer element using the Universal Integer ASN.1 type tag.
        Specified by:
        writeInteger in interface Asn1Writer
        Parameters:
        value - The integer value.
        Returns:
        A reference to this ASN.1 writer.
        Throws:
        IOException - If an error occurs while writing the element.
      • writeInteger

        public Asn1Writer writeInteger​(long value)
                                throws IOException
        Description copied from interface: Asn1Writer
        Writes an integer element using the Universal Integer ASN.1 type tag.
        Specified by:
        writeInteger in interface Asn1Writer
        Parameters:
        value - The integer value.
        Returns:
        A reference to this ASN.1 writer.
        Throws:
        IOException - If an error occurs while writing the element.
      • writeBigInteger

        public Asn1Writer writeBigInteger​(byte type,
                                          BigInteger value)
                                   throws IOException
        Description copied from interface: Asn1Writer
        Writes an integer element from the provided BigInteger using the provided type tag.
        Specified by:
        writeBigInteger in interface Asn1Writer
        Parameters:
        type - The type tag of the element.
        value - The BigInteger to be written.
        Returns:
        A reference to this ASN.1 writer.
        Throws:
        IOException - If an error occurs while writing the element.
      • writeNull

        public Asn1Writer writeNull()
                             throws IOException
        Description copied from interface: Asn1Writer
        Writes a null element using the Universal Null ASN.1 type tag.
        Specified by:
        writeNull in interface Asn1Writer
        Returns:
        A reference to this ASN.1 writer.
        Throws:
        IOException - If an error occurs while writing the element.
      • writeOctetString

        public Asn1Writer writeOctetString​(byte type,
                                           byte[] value)
                                    throws IOException
        Description copied from interface: Asn1Writer
        Writes an octet string element using the provided type tag.
        Specified by:
        writeOctetString in interface Asn1Writer
        Parameters:
        type - The type tag of the element.
        value - The byte array containing the octet string data.
        Returns:
        A reference to this ASN.1 writer.
        Throws:
        IOException - If an error occurs while writing the element.
      • writeOctetString

        public Asn1Writer writeOctetString​(byte[] value)
                                    throws IOException
        Description copied from interface: Asn1Writer
        Writes an octet string element using the Universal Octet String ASN.1 type tag.
        Specified by:
        writeOctetString in interface Asn1Writer
        Parameters:
        value - The byte array containing the octet string data.
        Returns:
        A reference to this ASN.1 writer.
        Throws:
        IOException - If an error occurs while writing the element.
      • writeOctetString

        public Asn1Writer writeOctetString​(byte[] value,
                                           int offset,
                                           int length)
                                    throws IOException
        Description copied from interface: Asn1Writer
        Writes an octet string element using the Universal Octet String ASN.1 type tag.
        Specified by:
        writeOctetString in interface Asn1Writer
        Parameters:
        value - The byte array containing the octet string data.
        offset - The offset in the byte array.
        length - The number of bytes to write.
        Returns:
        A reference to this ASN.1 writer.
        Throws:
        IOException - If an error occurs while writing the element.
      • writeOctetString

        public Asn1Writer writeOctetString​(ByteSequence value)
                                    throws IOException
        Description copied from interface: Asn1Writer
        Writes an octet string element using the Universal Octet String ASN.1 type tag.
        Specified by:
        writeOctetString in interface Asn1Writer
        Parameters:
        value - The octet string value.
        Returns:
        A reference to this ASN.1 writer.
        Throws:
        IOException - If an error occurs while writing the element.
      • writeOctetString

        public Asn1Writer writeOctetString​(CharSequence value)
                                    throws IOException
        Description copied from interface: Asn1Writer
        Writes a string as a UTF-8 encoded octet string element using the Universal Octet String ASN.1 type tag.
        Specified by:
        writeOctetString in interface Asn1Writer
        Parameters:
        value - The string to be written as a UTF-8 encoded octet string.
        Returns:
        A reference to this ASN.1 writer.
        Throws:
        IOException - If an error occurs while writing the element.