Package com.oss.asn1
Class HugeOpenType
java.lang.Object
com.oss.asn1.AbstractData
com.oss.asn1.AbstractOpenType
com.oss.asn1.HugeOpenType
- All Implemented Interfaces:
com.oss.asn1.PDUContainer
,Serializable
,Cloneable
The HugeOpenType class represents the ASN.1 ANY and the open type when the
ValueInFile directive has been applied.
This class is used to carry any valid huge ASN.1 value as an open type.
- Since:
- ASN.1/Java 1.4 beta A
- See Also:
-
Field Summary
Fields inherited from class com.oss.asn1.AbstractData
EQUALS, GREATER_THAN, LESS_THAN
-
Constructor Summary
ConstructorsConstructorDescriptionThe default constructor.HugeOpenType
(AbstractData decodedValue) Construct an instance of this class with an AbstractData object that represents an unencoded value of a valid ASN.1 type.HugeOpenType
(AbstractData pdu, Coder coder) Construct an instance of this class with a PDU object reference that represents the un-encoded value of a valid ASN.1 type.HugeOpenType
(ByteStorage encodedValue) Construct an instance of this class with a ByteStorage object that represents the encoding of a valid ASN.1 type.HugeOpenType
(ByteStorage encodedValue, TransferSyntax transferSyntax) Construct an instance of this class with a ByteStorage object that represents the encoding of a valid ASN.1 type. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Clone 'this' object.void
delete()
Destroy the instance of the AbstractData.final boolean
equalTo
(HugeOpenType that) Compare 'this' object to another OpenType object to see if their contents are the same.final ByteStorage
Get the encoding of an instance of a valid ASN.1 type.final InputStream
Get the encoding of an instance of a valid ASN.1 type.void
setDecodedValue
(AbstractData decodedValue) Set the unencoded data of a valid ASN.1 type.final void
setEncodedValue
(ByteStorage encodedValue) Set the encoded data, an encoding of a valid ASN.1 type.final void
setEncodedValue
(ByteStorage encodedValue, TransferSyntax transferSyntax) Set the encoded data, an encoding of a valid ASN.1 type.Methods inherited from class com.oss.asn1.AbstractOpenType
getDecodedValue, getTransferSyntax
Methods inherited from class com.oss.asn1.AbstractData
equals, hashCode, isEncodable, isPDU, isValid, toString, toString
-
Constructor Details
-
HugeOpenType
public HugeOpenType()The default constructor. -
HugeOpenType
public HugeOpenType(AbstractData pdu, Coder coder) throws EncodeNotSupportedException, EncodeFailedException Construct an instance of this class with a PDU object reference that represents the un-encoded value of a valid ASN.1 type. The "coder" will be used to encode the 'pdu' into a byte array.- Parameters:
pdu
- an AbstractData object representing a PDU.coder
- a Coder object used to encode "pdu".- Throws:
EncodeNotSupportedException
- when the encoding is disabled.EncodeFailedException
- when "pdu" cannot be encoded.
-
HugeOpenType
Construct an instance of this class with a ByteStorage object that represents the encoding of a valid ASN.1 type.- Parameters:
encodedValue
- the ByteStorage of the encoded data to set.
-
HugeOpenType
Construct an instance of this class with a ByteStorage object that represents the encoding of a valid ASN.1 type.- Parameters:
encodedValue
- the ByteStorage of the encoded data to set.transferSyntax
- identifier of the encoding rules of this encoded data
-
HugeOpenType
Construct an instance of this class with an AbstractData object that represents an unencoded value of a valid ASN.1 type.- Parameters:
decodedValue
- the AbstractData object to set.
-
-
Method Details
-
getEncodedValue
Get the encoding of an instance of a valid ASN.1 type. This will be useful for manual decoding. Manual decoding is used by default or whendisableAutomaticDecoding()
is invoked.- Returns:
- ByteStorage representing the encoded data.
-
getEncodedValueAsStream
Get the encoding of an instance of a valid ASN.1 type. This will be useful when manual decoding has been used. The stream returned can be passed as the first parameter to thedecode
method of theCoder
. Manual decoding is used by default or whendisableAutomaticDecoding()
is invoked.- Specified by:
getEncodedValueAsStream
in classAbstractOpenType
- Returns:
- InputStream representing the encoded data.
-
setEncodedValue
Set the encoded data, an encoding of a valid ASN.1 type.- Parameters:
encodedValue
- the ByteStorage of encoded data to set.
-
setEncodedValue
Set the encoded data, an encoding of a valid ASN.1 type.- Parameters:
encodedValue
- the ByteStorage of encoded data to set.transferSyntax
- identifier of the encoding rules of this encoded data
-
equalTo
Compare 'this' object to another OpenType object to see if their contents are the same.- Parameters:
that
- the OpenType object to compare 'this' object to.- Returns:
- true if contents of both objects are the same.
-
clone
Clone 'this' object.- Overrides:
clone
in classAbstractData
- Returns:
- deep copy of 'this' object.
-
delete
public void delete()Destroy the instance of the AbstractData. The contract of this method is to facilitate garbage collection by explicit destruction of the data that is no longer needed.- Overrides:
delete
in classAbstractOpenType
-
setDecodedValue
Set the unencoded data of a valid ASN.1 type.- Specified by:
setDecodedValue
in interfacecom.oss.asn1.PDUContainer
- Overrides:
setDecodedValue
in classAbstractOpenType
- Parameters:
decodedValue
- the reference to the AbstractData object to set.
-