iaik.asn1
Class UNKNOWN
java.lang.Object
|
+--iaik.asn1.ASN1Object
|
+--iaik.asn1.ConstructedType
|
+--iaik.asn1.UNKNOWN
- public class UNKNOWN
- extends ConstructedType
This class is used to decode unknown PRIVATE or APPLICATION ASN.1 types.
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.
|
Constructor Summary |
UNKNOWN()
Creates an empty UNKNOWN ASN.1 type. |
|
Method Summary |
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. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
UNKNOWN
public UNKNOWN()
- Creates an empty UNKNOWN ASN.1 type.
setValue
public void setValue(java.lang.Object object)
- Sets the value of this object to value.
- Overrides:
- setValue in class ConstructedType
- Parameters:
value - the new value as a byte array
getValue
public java.lang.Object getValue()
- Returns the value of this UNKNOWN ASN.1 object as a byte array.
- Overrides:
- getValue in class ConstructedType
- Returns:
- the value of this UNKNOWN ASN.1 object
encode
protected void encode(java.io.OutputStream os)
- Not implemented.
- Overrides:
- encode in class ConstructedType
- Tags copied from class: ConstructedType
- Parameters:
os - the output stream to which to write the data- Throws:
- java.io.IOException - if an error occurs while reading from the stream
decode
protected void decode(int length,
java.io.InputStream is)
throws java.io.IOException
- Decodes the value of an UMKNOWN ASN.1 object from the given
input stream.
An UNKNOWN ASN.1 object is an ASN.1 object of unknown tag. When during
the decoding procedure the
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.
- Overrides:
- decode in class ConstructedType
- Parameters:
length - 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 in- Throws:
- java.io.IOException - if there is a problem with the InputStream
toString
public java.lang.String toString()
- Returns a string that represents the contents of this UNKNOWN ASN.1 type.
- Overrides:
- toString in class ASN1Object
- Returns:
- the string representation
- See Also:
ASN1Object.toString()