DirectoryString (Bouncy Castle Library 1.52 API Specification)

org.bouncycastle.asn1.x500

## Class DirectoryString

- java.lang.Object
- - org.bouncycastle.asn1.ASN1Object
  - - org.bouncycastle.asn1.x500.DirectoryString

- All Implemented Interfaces:
    ASN1Choice, ASN1Encodable, ASN1String, Encodable

      public class DirectoryString
      extends ASN1Object
      implements ASN1Choice, ASN1String

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DirectoryString(java.lang.String string)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static DirectoryString` | `getInstance(ASN1TaggedObject o, boolean explicit)`
    `static DirectoryString` | `getInstance(java.lang.Object o)`
    `java.lang.String` | `getString()`
    `ASN1Primitive` | `toASN1Primitive()` DirectoryString ::= CHOICE { teletexString TeletexString (SIZE (1..MAX)), printableString PrintableString (SIZE (1..MAX)), universalString UniversalString (SIZE (1..MAX)), utf8String UTF8String (SIZE (1..MAX)), bmpString BMPString (SIZE (1..MAX)) }
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.bouncycastle.asn1.ASN1Object

      `equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### DirectoryString

          public DirectoryString(java.lang.String string)

  - ### Method Detail

    - #### getInstance

          public static DirectoryString getInstance(java.lang.Object o)

    - #### getInstance

          public static DirectoryString getInstance(ASN1TaggedObject o,
                                    boolean explicit)

    - #### getString

          public java.lang.String getString()

      Specified by:
        `getString` in interface `ASN1String`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### toASN1Primitive

          public ASN1Primitive toASN1Primitive()

            DirectoryString ::= CHOICE {
              teletexString               TeletexString (SIZE (1..MAX)),
              printableString             PrintableString (SIZE (1..MAX)),
              universalString             UniversalString (SIZE (1..MAX)),
              utf8String                  UTF8String (SIZE (1..MAX)),
              bmpString                   BMPString (SIZE (1..MAX))  }

      Specified by:
        `toASN1Primitive` in interface `ASN1Encodable`
      Specified by:
        `toASN1Primitive` in class `ASN1Object`
      Returns:
        a primitive representation of this object.