|
IAIK TSP version 2.01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectiaik.tsp.PKIFreeText
This class implements the TSP ASN.1 type PKIFreeText
as it
is specified in RFC 3161.
PKIFreeText ::= SEQUENCE { SIZE (1..MAX) OF UTF8String -- text encoded as UTF-8 String (note: each UTF8String SHOULD -- include an RFC 1766 language tag to indicate the language -- of the contained text) }
This class handles the ASN.1 structure and the DER encoding and decoding of this structure.
Constructor Summary | |
PKIFreeText(iaik.asn1.ASN1Object component)
This constructor tries to reconstruct a PKIFreeText object
from the given ASN.1 structure. |
|
PKIFreeText(String text)
To construct a new PKIFreeText object with the given
String . |
Method Summary | |
void |
addString(String text)
This method adds a new string to the end of the structure. |
byte[] |
getEncoded()
This method DER encodes the ASN.1 PKIFreeText object. |
int |
getSize()
Returns the number of string elements. |
String |
getStringAt(int position)
This method returns the string at the specified index. |
void |
setStringAt(String text,
int position)
This method sets a string at the specified index. |
iaik.asn1.ASN1Object |
toASN1Object()
Returns the ASN.1 structure of the PKIFreeText object. |
String |
toString()
This method returns a string representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PKIFreeText(String text) throws NullPointerException
PKIFreeText
object with the given
String
.
text
- A message string.
NullPointerException
- Thrown if the argument is null
.public PKIFreeText(iaik.asn1.ASN1Object component) throws iaik.asn1.CodingException
PKIFreeText
object
from the given ASN.1 structure.
component
- The ASN.1 structure.
iaik.asn1.CodingException
- Thrown if the given ASN1Object
is not a
PKIFreeText
ASN.1 object.Method Detail |
public byte[] getEncoded()
PKIFreeText
object.
PKIFreeText
object.public iaik.asn1.ASN1Object toASN1Object()
PKIFreeText
object.
ASN1Object
of the PKIFreeText
object.public void addString(String text)
text
- Text to be added.public void setStringAt(String text, int position) throws ArrayIndexOutOfBoundsException
addString
method.
text
- Text to be set.position
- Position of the text.
ArrayIndexOutOfBoundsException
- Thrown if the index is invalid.public int getSize()
public String getStringAt(int position) throws ArrayIndexOutOfBoundsException
position
- The position of the desired text.
ArrayIndexOutOfBoundsException
- Thrown if the index is invalid.public String toString()
PKIFreeText
object.
|
This Javadoc may contain text parts from IETF Internet Standard specifications (see copyright note) and RSA Data Security Public-Key Cryptography Standards (see copyright note). | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |