Package com.oss.asn1
Class AbstractString32
java.lang.Object
com.oss.asn1.AbstractData
com.oss.asn1.AbstractString
com.oss.asn1.AbstractString32
- All Implemented Interfaces:
com.oss.asn1.Sizeable
,Serializable
,Cloneable
- Direct Known Subclasses:
UniversalString
,UTF8String32
The AbstractString32 class implements the functionality common to all
ASN.1 CharacterString types with four bytes per character.
This abstract base class is a public class, but it is not considered as being part of the public API and should not be directly referenced in your application program.
- Since:
- ASN.1/Java 1.0-beta A
- See Also:
-
Field Summary
Fields inherited from class com.oss.asn1.AbstractData
EQUALS, GREATER_THAN, LESS_THAN
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Clone 'this' object.void
delete()
Destroy the instance of the AbstractData.final int
getSize()
Used to get the length of 'this' object in characters.int
hashCode()
Returns a hash code for this objectfinal int[]
Get the value of 'this' object as an array of int.final void
setValue
(char[] value) Set the value of 'this' object to an array of char.final void
setValue
(int[] value) Set the value of 'this' object to an int[].final void
Set the value of 'this' object to a String.final String
Get the value of 'this' object as a String.Methods inherited from class com.oss.asn1.AbstractString
compareTo, equalTo, getLength
Methods inherited from class com.oss.asn1.AbstractData
equals, getTypeInfo, isEncodable, isPDU, isValid, toString, toString
-
Method Details
-
setValue
public final void setValue(int[] value) Set the value of 'this' object to an int[].- Parameters:
value
- the int[] value to set 'this' object to.
-
setValue
Set the value of 'this' object to a String.- Specified by:
setValue
in classAbstractString
- Parameters:
value
- the String value to set 'this' object to.- Throws:
IllegalArgumentException
-
setValue
Set the value of 'this' object to an array of char.- Specified by:
setValue
in classAbstractString
- Parameters:
value
- the char[] value to set 'this' object to.- Throws:
IllegalArgumentException
-
intArrayValue
public final int[] intArrayValue()Get the value of 'this' object as an array of int.- Returns:
- int[] value of 'this' object.
-
stringValue
Get the value of 'this' object as a String. Note that narrowing of the data from a 4-byte character string to a 2-byte character string may occur.- Specified by:
stringValue
in classAbstractString
- Returns:
- value of 'this' object as a String.
-
getSize
public final int getSize()Used to get the length of 'this' object in characters.- Specified by:
getSize
in interfacecom.oss.asn1.Sizeable
- Specified by:
getSize
in classAbstractString
- Returns:
- the length of 'this' string.
-
hashCode
public int hashCode()Returns a hash code for this object- Overrides:
hashCode
in classAbstractString
- Returns:
- a hash code for this object
-
clone
Clone 'this' object.- Overrides:
clone
in classAbstractData
- Returns:
- deep copy of 'this' object.
-
delete
public void delete()Destroy the instance of the AbstractData. The contract of this method is to facilitate garbage collection by explicit destruction of the data that is no longer needed.- Overrides:
delete
in classAbstractData
-