Package com.oss.asn1
Class RelaySafeEnumerated
java.lang.Object
com.oss.asn1.AbstractData
com.oss.asn1.Enumerated
com.oss.asn1.RelaySafeEnumerated
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
XRelaySafeEnumerated
The RelaySafeEnumerated class represents the ASN.1 ENUMERATED type and is
able to store an unknown extension for further relaying.
- Since:
- ASN.1/Java 6.0
- See Also:
-
Field Summary
Fields inherited from class com.oss.asn1.AbstractData
EQUALS, GREATER_THAN, LESS_THAN
-
Constructor Summary
ConstructorsConstructorDescriptionThe default constructor.RelaySafeEnumerated
(long value) Construct with a long value. -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
Destroy the instance of the AbstractData.final boolean
Checks if the object is the result of decoding unknown enumerated value of extensible enumerated type.For serializable classes, thereadResolve
method allows a class to replace/resolve the object read from the stream before it is returned to the caller.void
setRelayId
(String relayID) Set the identification of the transfer syntax.Methods inherited from class com.oss.asn1.Enumerated
clone, compareTo, equalTo, getTypeName, hashCode, longValue, name
Methods inherited from class com.oss.asn1.AbstractData
equals, isEncodable, isPDU, isValid, toString, toString
-
Constructor Details
-
RelaySafeEnumerated
public RelaySafeEnumerated()The default constructor. -
RelaySafeEnumerated
public RelaySafeEnumerated(long value) Construct with a long value.- Parameters:
value
- the long to set 'this' object to.
-
-
Method Details
-
isUnknownEnumerator
public final boolean isUnknownEnumerator()Checks if the object is the result of decoding unknown enumerated value of extensible enumerated type.- Overrides:
isUnknownEnumerator
in classEnumerated
- Returns:
- false
-
readResolve
For serializable classes, thereadResolve
method allows a class to replace/resolve the object read from the stream before it is returned to the caller. By implementing thereadResolve
method, this class replaces its own instance being de-serialized by the correspondent pre-existing enumerator. In the JDK 1.2ObjectInputStream
checks if the class of the object defines thereadResolve
method. If the method is defined, thereadResolve
method is called whenObjectInputStream
has read an object from the stream and is preparing to return it to the caller. To make it work under JDK 1.1, you have to subclassObjectInputStream
and call thereadResolve
method explicitly from itsresolveObject
method.- Returns:
- a replacement for the de-serialized instance, that is a pre-existing enumerator, defined in the specific subclass of the Enumerated.
- Throws:
ObjectStreamException
- if the de-serialized instance is not a legal enumerator of this class.
-
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 classAbstractData
-
setRelayId
Set the identification of the transfer syntax.- Parameters:
relayID
- identifies the transfer syntax of this unknown extension.
-