|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--iaik.asn1.ASN1Object | +--iaik.asn1.NULL
This class implements the native ASN.1 type "NULL". NULL is a simple non-string ASN.1 type identified by the UNIVERSAL TAG number 5.
An ASN.1 NULL object can represent only one value, null
. It may be used
in situations where only the presence of a type is important, but no concrete value.
The DER encoding of the NULL
type is primitive and only consists of
identifier (05) and length octets (00); no content octets are necessary:
id length 05 00Consequently, no value can be specified when creating a new
NULL
object; and when asking for a value by means of the getValue()
method, null
is returned.
ASN1Object
,
ASN
Fields inherited from class iaik.asn1.ASN1Object |
asnType, constructed, encode_listener, indefinite_length, isStringType, stream_mode |
Constructor Summary | |
NULL()
Allocates a NULL object. |
Method Summary | |
protected void |
decode(int length,
InputStream is)
Decodes a NULL value from the given InputStream. |
protected void |
encode(OutputStream os)
DER encodes this NULL ASN1Object and writes the result to the given output stream. |
Object |
getValue()
Returns null . |
void |
setValue(Object object)
Does nothing. |
String |
toString()
Returns a string that represents the contents of this NULL ASN1Object. |
Methods inherited from class iaik.asn1.ASN1Object |
addComponent, addEncodeListener, clone, countComponents, encodeObject, getAsnType, getComponentAt, indefiniteLength, isA, isConstructed, isStringType, setIndefiniteLength |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public NULL()
Method Detail |
public Object getValue()
null
.getValue
in class ASN1Object
null
public void setValue(Object object)
setValue
in class ASN1Object
object
- an Object which is used for nothingprotected void encode(OutputStream os)
NULL
object does not have a value, this method actually
does nothing.encode
in class ASN1Object
os
- the output stream to which to write the dataprotected void decode(int length, InputStream is)
NULL
object does not have a value, this method actually
does nothing.decode
in class ASN1Object
length
- the length of the ASN1Object which shall be decodedis
- the input stream from which the der encoded data is read inpublic String toString()
toString
in class ASN1Object
ASN1Object.toString()
|
This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |