org.apache.asn1.der
Class DERString

java.lang.Object
  extended byorg.apache.asn1.der.DERObject
      extended byorg.apache.asn1.der.DERString
All Implemented Interfaces:
DEREncodable
Direct Known Subclasses:
DERBMPString, DERGeneralizedTime, DERGeneralString, DERIA5String, DERNumericString, DERPrintableString, DERTeletexString, DERUniversalString, DERUTCTime, DERUTF8String, DERVisibleString

public abstract class DERString
extends DERObject

Interface for DER string objects.


Field Summary
 
Fields inherited from class org.apache.asn1.der.DERObject
APPLICATION, BIT_STRING, BMP_STRING, BOOLEAN, CONSTRUCTED, ENUMERATED, EXTERNAL, GENERAL_STRING, GENERALIZED_TIME, GRAPHIC_STRING, IA5_STRING, INTEGER, NULL, NUMERIC_STRING, OBJECT_IDENTIFIER, OCTET_STRING, PRINTABLE_STRING, SEQUENCE, SET, T61_STRING, tag, TAGGED, TERMINATOR, UNIVERSAL_STRING, UTC_TIME, UTF8_STRING, value, VIDEOTEX_STRING, VISIBLE_STRING
 
Constructor Summary
(package private) DERString(int tag, byte[] value)
          Basic DERObject constructor.
 
Method Summary
protected static java.lang.String byteArrayToString(byte[] bytes)
          Utility method for converting byte arrays to Strings.
 java.lang.String getString()
          Lazy accessor.
protected static byte[] stringToByteArray(java.lang.String string)
          Utility method for converting Strings to bytes.
 
Methods inherited from class org.apache.asn1.der.DERObject
encode, equals, getOctets, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DERString

DERString(int tag,
          byte[] value)
Basic DERObject constructor.

Method Detail

getString

public java.lang.String getString()
Lazy accessor.

Returns:
underlying byte array converted to a String

byteArrayToString

protected static java.lang.String byteArrayToString(byte[] bytes)
Utility method for converting byte arrays to Strings.

Parameters:
bytes -
Returns:
String

stringToByteArray

protected static byte[] stringToByteArray(java.lang.String string)
Utility method for converting Strings to bytes.

Parameters:
string -
Returns:
bytes


Copyright © 2005-2006 . All Rights Reserved.