Package com.oss.asn1

Class AbstractString

java.lang.Object
com.oss.asn1.AbstractData
com.oss.asn1.AbstractString
All Implemented Interfaces:
com.oss.asn1.Sizeable, Serializable, Cloneable
Direct Known Subclasses:
AbstractString16, AbstractString32, UTF8String

public abstract class AbstractString extends AbstractData implements com.oss.asn1.Sizeable
The AbstractString class provides a common ancestor for all of the ASN.1/Java string classes.
Since:
ASN.1/Java 1.0-beta A
See Also:
  • Method Details

    • setValue

      public abstract void setValue(String value)
      Set the value of 'this' object to a String.
      Parameters:
      value - the value to set 'this' object to.
    • setValue

      public abstract void setValue(char[] value)
      Set the value of 'this' object to an array of char.
      Parameters:
      value - the value to set 'this' object to.
    • stringValue

      public abstract String stringValue()
      Get the value of 'this' object as a String. This method is abstract.
      Returns:
      the String value of 'this' object.
    • getSize

      public abstract int getSize()
      Get the number of elements in the array of objects.
      Specified by:
      getSize in interface com.oss.asn1.Sizeable
      Returns:
      number of elements in the array.
    • getLength

      @Deprecated public final int getLength()
      Deprecated.
      Get the length of this string in characters. This method is deprecated. Use the getSize method instead.
      Returns:
      the length of this string.
    • equalTo

      public final boolean equalTo(AbstractString that)
      Compare 'this' object to another object to see if their contents are the same.
      Parameters:
      that - the AbstractData object to compare 'this' object to.
      Returns:
      true if contents of both objects are the same.
    • compareTo

      public final int compareTo(AbstractString that)
      Compare 'this' object to another AbstractString object to determine whether the contents of 'this' object is less than, equal to, or greater than the contents of another object.
      Parameters:
      that - AbstractString object that is compared with 'this' object
      Returns:
      LESS_THAN, EQUALS, GREATER_THAN values as the results of comparison.
      Throws:
      NullPointerException - thrown when 'that' is null.