public class Asn1CHARACTER_STRING extends Asn1Seq
Modifier and Type | Field and Description |
---|---|
Asn1ObjectDescriptor |
data_value_descriptor |
Asn1CHARACTER_STRING_identification |
identification |
Asn1OctetString |
string_value |
static Asn1Tag |
TAG |
BIT_STRING, BMPString, BOOLEAN, DATE, DATE_TIME, DURATION, ENUMERATED, EOC, EXTERNAL, GeneralString, GeneralTime, GraphicString, IA5String, INTEGER, mAsn1TypeName, 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 and Description |
---|
Asn1CHARACTER_STRING() |
Asn1CHARACTER_STRING(Asn1CHARACTER_STRING_identification identification_,
Asn1ObjectDescriptor data_value_descriptor_,
Asn1OctetString string_value_)
This constructor sets all elements to references to the
given objects
|
Asn1CHARACTER_STRING(Asn1CHARACTER_STRING_identification identification_,
Asn1OctetString string_value_)
This constructor is for required elements only.
|
Asn1CHARACTER_STRING(Asn1CHARACTER_STRING_identification identification_,
byte[] string_value_)
This constructor is for required elements only.
|
Asn1CHARACTER_STRING(Asn1CHARACTER_STRING_identification identification_,
java.lang.String data_value_descriptor_,
byte[] string_value_)
This constructor allows primitive data to be passed for all
primitive elements.
|
Modifier and Type | Method and Description |
---|---|
void |
decode(Asn1BerDecodeBuffer buffer,
boolean explicit,
int implicitLength)
This method is used to decode a message that is encoded in
BER or DER format.
|
void |
decode(Asn1PerDecodeBuffer buffer)
This method is the base implementation of the standard Packed
Encoding Rules (PER) decode method.
|
int |
encode(Asn1BerEncodeBuffer buffer,
boolean explicit)
This method is used to encode this data type in BER or DER format.
|
void |
encode(Asn1BerOutputStream out,
boolean explicit)
This method writes to the stream an encoded ASN.1 type value
including the UNIVERSAL tag value and length if explicit
tagging is specified.
|
void |
encode(Asn1PerEncodeBuffer buffer)
This method is the base implementation of the standard Packed
Encoding Rules (PER) encode method.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAsn1TypeName()
Returns the ASN.1 specification type name for this type.
|
int |
getElementCount()
Return the number of declared elements, plus 1 if the sequence/set is
extensible.
|
java.lang.String |
getElementName(int index)
Return the ASN.1 name of the element identified by index.
|
java.lang.Object |
getElementValue(int index)
Return the value of the element identified by index.
|
int |
hashCode()
Returns the hash code of the object.
|
void |
init() |
void |
print(java.io.PrintWriter _out,
java.lang.String _varName,
int _level)
This method will format and output a primitive value to the
given print writer.
|
getElementValue
public static final Asn1Tag TAG
public Asn1CHARACTER_STRING_identification identification
public Asn1ObjectDescriptor data_value_descriptor
public Asn1OctetString string_value
public Asn1CHARACTER_STRING()
public Asn1CHARACTER_STRING(Asn1CHARACTER_STRING_identification identification_, Asn1ObjectDescriptor data_value_descriptor_, Asn1OctetString string_value_)
public Asn1CHARACTER_STRING(Asn1CHARACTER_STRING_identification identification_, Asn1OctetString string_value_)
public Asn1CHARACTER_STRING(Asn1CHARACTER_STRING_identification identification_, java.lang.String data_value_descriptor_, byte[] string_value_)
public Asn1CHARACTER_STRING(Asn1CHARACTER_STRING_identification identification_, byte[] string_value_)
public java.lang.String getAsn1TypeName()
Asn1Type
getAsn1TypeName
in class Asn1Type
public void init()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
Asn1Type
public int getElementCount()
Asn1SeqOrSet
getElementCount
in class Asn1SeqOrSet
public java.lang.Object getElementValue(int index)
Asn1SeqOrSet
getElementValue
in class Asn1SeqOrSet
public java.lang.String getElementName(int index)
Asn1SeqOrSet
getElementName
in class Asn1SeqOrSet
public void decode(Asn1BerDecodeBuffer buffer, boolean explicit, int implicitLength) throws Asn1Exception, java.io.IOException
Asn1Type
decode
in interface Asn1TypeIF
decode
in class Asn1Type
buffer
- Decode message buffer objectexplicit
- Flag indicating explicit tag should be parsed
from the encoded type.implicitLength
- Length of the contents field (only required
if explicit is false).Asn1Exception
java.io.IOException
public int encode(Asn1BerEncodeBuffer buffer, boolean explicit) throws Asn1Exception
Asn1Type
encode
in interface Asn1TypeIF
encode
in class Asn1Type
buffer
- Encode message buffer objectexplicit
- Flag indicating explicit tag should be added
to the encoded type.Asn1Exception
public void encode(Asn1BerOutputStream out, boolean explicit) throws Asn1Exception, java.io.IOException
Asn1Type
encode
in interface Asn1TypeIF
encode
in class Asn1Type
out
- BER Output Stream objectexplicit
- Flag indicating explicit tagging should be doneAsn1Exception
- Thrown, if operation is failed.java.io.IOException
- Any exception thrown by the underlying OutputStream.public void decode(Asn1PerDecodeBuffer buffer) throws Asn1Exception, java.io.IOException
Asn1Type
decode
in interface Asn1TypeIF
decode
in class Asn1Type
buffer
- PER Encode message buffer objectAsn1Exception
java.io.IOException
public void encode(Asn1PerEncodeBuffer buffer) throws Asn1Exception, java.io.IOException
Asn1Type
encode
in interface Asn1TypeIF
encode
in class Asn1Type
buffer
- PER Encode message buffer objectAsn1Exception
java.io.IOException
public void print(java.io.PrintWriter _out, java.lang.String _varName, int _level)
Asn1Type
print
in interface Asn1TypeIF
print
in class Asn1Type
_out
- Print writer for output_varName
- Name of variable_level
- Indentation level