public class UNKNOWN extends ConstructedType
This class only supports decoding facilities for properly handling any DER encoded ASN.1 objects with an unknown tag specification. No encoding mechanism are provided.
Whenever the DerCoder parses a tag it does not
know of, it creates a UNKNOWN object and supplies it with the
content octets read from the decoding.
In this way, an application may ask for the pure content bytes by means
of the getValue() method.
content_count, content_dataasnType, constructed, encode_listener, indefinite_length, isStringType, stream_mode| Constructor and Description |
|---|
UNKNOWN()
Creates an empty UNKNOWN ASN.1 type.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
decode(int length,
java.io.InputStream is)
Decodes the value of an UMKNOWN ASN.1 object from the given
input stream.
|
protected void |
encode(java.io.OutputStream os)
Not implemented.
|
java.lang.Object |
getValue()
Returns the value of this UNKNOWN ASN.1 object as a byte array.
|
void |
setValue(java.lang.Object object)
Sets the value of this object to value.
|
java.lang.String |
toString()
Returns a string that represents the contents of this UNKNOWN ASN.1 type.
|
addComponent, addComponent, addEncodeListener, countComponents, getComponentAt, getComponents, removeComponent, removeComponent, setComponentaddEncodeListener, encodeObject, getAsnType, indefiniteLength, isA, isConstructed, isStringType, setAutomaticRepair, setAutomaticRepairRecursive, setIndefiniteLength, setIndefiniteRecursivepublic void setValue(java.lang.Object object)
setValue in class ConstructedTypeobject - the new value as a byte arraypublic java.lang.Object getValue()
getValue in class ConstructedTypeprotected void encode(java.io.OutputStream os)
encode in class ConstructedTypeos - the output stream to which to write the dataprotected void decode(int length,
java.io.InputStream is)
throws java.io.IOException
DerCoder parses
a tag it does not know of, it creates an UNKNOWN object
and uses this decode method for reading the raw content
octets from the decoding stream.decode in class ConstructedTypelength - the already decoded length, i.e. number of the bytes occupied
by the value of the UNKNOWN ASN.1 object to be decodedis - the input stream from which the der encoded data is read injava.io.IOException - if there is a problem with the InputStreampublic java.lang.String toString()
toString in class ASN1ObjectASN1Object.toString()