|
IAIK TSP version 2.32 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.tsp.PKIFreeText
public class 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(ASN1Object component)
This constructor tries to reconstruct a PKIFreeText object
from the given ASN.1 structure. |
|
PKIFreeText(java.lang.String text)
To construct a new PKIFreeText object with the given
String . |
Method Summary | |
---|---|
void |
addString(java.lang.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. |
java.lang.String |
getStringAt(int position)
This method returns the string at the specified index. |
void |
setStringAt(java.lang.String text,
int position)
This method sets a string at the specified index. |
ASN1Object |
toASN1Object()
Returns the ASN.1 structure of the PKIFreeText object. |
java.lang.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(java.lang.String text) throws java.lang.NullPointerException
PKIFreeText
object with the given
String
.
text
- A message string.
java.lang.NullPointerException
- Thrown if the argument is null
.public PKIFreeText(ASN1Object component) throws CodingException
PKIFreeText
object
from the given ASN.1 structure.
component
- The ASN.1 structure.
CodingException
- Thrown if the given ASN1Object
is not a
PKIFreeText
ASN.1 object.Method Detail |
---|
public byte[] getEncoded()
PKIFreeText
object.
PKIFreeText
object.public ASN1Object toASN1Object()
PKIFreeText
object.
ASN1Object
of the PKIFreeText
object.public void addString(java.lang.String text)
text
- Text to be added.public void setStringAt(java.lang.String text, int position) throws java.lang.ArrayIndexOutOfBoundsException
addString
method.
text
- Text to be set.position
- Position of the text.
java.lang.ArrayIndexOutOfBoundsException
- Thrown if the index is invalid.public int getSize()
public java.lang.String getStringAt(int position) throws java.lang.ArrayIndexOutOfBoundsException
position
- The position of the desired text.
java.lang.ArrayIndexOutOfBoundsException
- Thrown if the index is invalid.public java.lang.String toString()
toString
in class java.lang.Object
PKIFreeText
object.
|
This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |