com.objsys.asn1j.runtime
Class Asn1Base64BinaryString

java.lang.Object
  extended by com.objsys.asn1j.runtime.Asn1Type
      extended by com.objsys.asn1j.runtime.Asn1OctetString
          extended by com.objsys.asn1j.runtime.Asn1Base64BinaryString
All Implemented Interfaces:
Asn1TypeIF, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class Asn1Base64BinaryString
extends Asn1OctetString

This is a container class for holding the components of an XML Base64Binary value.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.objsys.asn1j.runtime.Asn1OctetString
TAG, value
 
Fields inherited from class com.objsys.asn1j.runtime.Asn1Type
BIT_STRING, BMPString, BOOLEAN, DATE, DATE_TIME, DURATION, ENUMERATED, EOC, EXTERNAL, GeneralString, GeneralTime, GraphicString, IA5String, INTEGER, NULL, NumericString, OBJECT_IDENTIFIER, ObjectDescriptor, OCTET_STRING, OID_IRI, OpenType, PrintableString, REAL, RELATIVE_OID_IRI, RelativeOID, SEQUENCE, SET, T61String, TeletexString, TIME, TIME_OF_DAY, UniversalString, UTCTime, UTF8String, VideotexString, VisibleString
 
Constructor Summary
Asn1Base64BinaryString()
          This constructor creates an empty octet string that can be used in a decode method call to receive an octet string value.
Asn1Base64BinaryString(byte[] data)
          This constructor initializes an octet string from the given byte array.
Asn1Base64BinaryString(byte[] data, int offset, int nbytes)
          This constructor initializes an octet string from a portion of the given byte array.
Asn1Base64BinaryString(java.lang.String value_)
          This constructor parses the given ASN.1 value text (either a binary or hex data string) and assigns the values to the internal bit string.
 
Method Summary
 void decodeXML(java.lang.String buffer, java.lang.String attrs)
          This method decodes a base64 encoded character string type into binary octets.
 void encode(Asn1XmlEncoder buffer, java.lang.String elemName, java.lang.String nsPrefix)
          This method encodes ASN.1 octet string type using the XML Encoding as specified in the XML schema standard(asn2xsd).
 void encodeAttribute(Asn1XmlEncoder buffer, java.lang.String attrName)
          This method encodes a base64 string type attribute using the XML encoding as specified in the XML schema standard(asn2xsd).
 java.lang.String toString()
          This method will return a string representation of the octet string value.
 
Methods inherited from class com.objsys.asn1j.runtime.Asn1OctetString
compareTo, decode, decode, decode, decode, decode, decode, decodeXER, encode, encode, encode, encode, encode, encode, encode, encode, encode, encode, encode, encodeBase64Binary, equals, equals, getLength, getMderLength, hashCode, toInputStream
 
Methods inherited from class com.objsys.asn1j.runtime.Asn1Type
clone, decode, decode, decode, decode, decode, encode, encode, equals, getTypeName, indent, isOpenType, matchTag, matchTag, pdiag, print, setKey, setOpenType
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Asn1Base64BinaryString

public Asn1Base64BinaryString()
This constructor creates an empty octet string that can be used in a decode method call to receive an octet string value.


Asn1Base64BinaryString

public Asn1Base64BinaryString(byte[] data)
This constructor initializes an octet string from the given byte array.

Parameters:
data - Byte array containing an octet string in binary form.

Asn1Base64BinaryString

public Asn1Base64BinaryString(byte[] data,
                              int offset,
                              int nbytes)
This constructor initializes an octet string from a portion of the given byte array. A new byte array is created starting at the given offset and consisting of the given number of bytes.

Parameters:
data - Byte array containing an octet string in binary form.
offset - Starting offset in data from which to copy bytes
nbytes - Number of bytes to copy from target array

Asn1Base64BinaryString

public Asn1Base64BinaryString(java.lang.String value_)
                       throws Asn1ValueParseException
This constructor parses the given ASN.1 value text (either a binary or hex data string) and assigns the values to the internal bit string. Examples of valid value formats are as follows: Binary string: '11010010111001'B Hex string: '0fa56920014abc'H Char string: 'abcdefg'

Parameters:
value_ - The ASN.1 value specification text
Throws:
Asn1ValueParseException
Method Detail

decodeXML

public void decodeXML(java.lang.String buffer,
                      java.lang.String attrs)
               throws Asn1Exception
This method decodes a base64 encoded character string type into binary octets.

Specified by:
decodeXML in interface Asn1TypeIF
Overrides:
decodeXML in class Asn1OctetString
Parameters:
buffer - String containing data to be decoded
attrs - Attributes string from element tag
Throws:
Asn1Exception

encode

public void encode(Asn1XmlEncoder buffer,
                   java.lang.String elemName,
                   java.lang.String nsPrefix)
            throws java.io.IOException,
                   Asn1Exception
This method encodes ASN.1 octet string type using the XML Encoding as specified in the XML schema standard(asn2xsd).

Overrides:
encode in class Asn1OctetString
Parameters:
buffer - Encode message buffer object
elemName - XML element name used to wrap string
nsPrefix - Element namespace prefix value
Throws:
java.io.IOException
Asn1Exception

encodeAttribute

public void encodeAttribute(Asn1XmlEncoder buffer,
                            java.lang.String attrName)
                     throws Asn1Exception,
                            java.io.IOException
This method encodes a base64 string type attribute using the XML encoding as specified in the XML schema standard(asn2xsd).

Overrides:
encodeAttribute in class Asn1OctetString
Parameters:
buffer - Encode message buffer object
attrName - Attribute name
Throws:
Asn1Exception
java.io.IOException

toString

public java.lang.String toString()
This method will return a string representation of the octet string value. The format is the ASN.1 value format for this type..

Overrides:
toString in class Asn1OctetString
Returns:
Stringified representation of the value