public class GraphicString extends ASN1Object
Attention: This class is present only because the GraphicString type is required by the Entrust Archive format. It makes no checks to see if the value it is initialized with actually contains graphically displayable characters. This class should not be used by applications.
| Modifier and Type | Field and Description |
|---|---|
static ASN |
asnGraphicString
Global ASN.1 type
GraphicString |
asnType, constructed, encode_listener, indefinite_length, isStringType, stream_mode| Constructor and Description |
|---|
GraphicString()
Creates an empty GraphicString object.
|
GraphicString(java.lang.String value)
Creates a new GraphicString object for the given String value.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
decode(int length,
java.io.InputStream is)
Decodes a GraphicString value from the given InputStream.
|
protected void |
encode(java.io.OutputStream os)
DER encodes this GraphicString ASN1Object and writes the result to the
given output stream.
|
java.lang.Object |
getValue()
Returns the value of this GraphicString as a String object.
|
void |
setValue(java.lang.Object object)
Sets the value of this GraphicString.
|
java.lang.String |
toString()
Returns a String that represents the contents of this GraphicString.
|
addComponent, addEncodeListener, countComponents, encodeObject, getAsnType, getComponentAt, indefiniteLength, isA, isConstructed, isStringType, setAutomaticRepair, setAutomaticRepairRecursive, setIndefiniteLength, setIndefiniteRecursivepublic static final ASN asnGraphicString
GraphicStringpublic GraphicString()
public GraphicString(java.lang.String value)
Attention: No check is performed if the supplied String value actually is composed only of graphically displayable characters.
value - the String value this GraphicString object should be initialized withpublic java.lang.Object getValue()
getValue in class ASN1Objectpublic void setValue(java.lang.Object object)
The supplied value has to be a Java object of type String.
setValue in class ASN1Objectobject - the String value to be set for this GraphicStringprotected void encode(java.io.OutputStream os)
throws java.io.IOException
Applications should call one of the
encode methods of the DerCoder
class for performing the encoding.
encode in class ASN1Objectos - the output stream to which to write the datajava.io.IOException - if an I/O error occurs while writing to the streamprotected void decode(int length,
java.io.InputStream is)
throws java.io.IOException
length bytes to be read represent the value of an
ASN.1 object of type GraphicString.
Application should call one of the decode methods of
the DerCoder class for performing
the decoding.
No check is performed if the received value actually is composed only of characters belonging to the GraphicString character set!
decode in class ASN1Objectlength - the already decoded length, i.e. number of the bytes
representing the value of the GraphicString to be decodedis - the input stream from which the DER encoded data is read injava.io.IOException - if there is a problem with the InputStreampublic java.lang.String toString()
toString in class ASN1ObjectASN1Object.toString()