| java.lang.Object javax.swing.text.html.parser.Asn1Entity
Asn1Entity | class Asn1Entity (Code) | | It implements ASN.1 codification tools for
javax.swing.text.html.parser.Entity . Given an
Entity , its values are codified in ASN.1 according to the
following rule:
HTMLEntity ::= SEQUENCE {
name UTF8String,
value INTEGER,
general [0] IMPLICIT BOOLEAN DEFAULT FALSE,
parameter [1] IMPLICIT BOOLEAN DEFAULT FALSE,
data UTF8String
}
The class can be used to obtain a byte array representing the codification of
an Entity , as well as an Entity from a byte
array (previously obtained codifying an Entity ). In fact, it
serves as a wrapper for the codification and the Entity
itself.
|
Constructor Summary | |
public | Asn1Entity(byte[] encoded) Constructs a new instance of an Asn1Entity class from a
byte array. | public | Asn1Entity(Entity entity) Constructs a new instance of an Asn1Entity class from an
Entity . |
Method Summary | |
public byte[] | getEncoded() Returns the representation of an Entity in ASN.1
codification.
If the Asn1Entity object was created with an
Entity , then the Entity is codified and
returned as a byte array. | public Entity | getEntity() Returns the Entity obtained from the decodification of an
ASN.1 codified byte array.
If the Asn1Entity was created giving an
Entity , a reference to the same Entity is
obtained. | static ASN1Type | getInstance() It returns an ASN1Type value that contains the ASN.1
codification rules for an Entity with its encoder and
decoder. |
Asn1Entity | public Asn1Entity(byte[] encoded)(Code) | | Constructs a new instance of an Asn1Entity class from a
byte array. The byte array received as argument can be later decodified
into an Entity .
Parameters: encoded - A byte array containing the codified information of anEntity . |
Asn1Entity | public Asn1Entity(Entity entity)(Code) | | Constructs a new instance of an Asn1Entity class from an
Entity . The Entity received as argument
can be then codified into a byte array.
The value received as argument should not be null. If so, a
NullPointerException is thrown.
Parameters: entity - The Entity to be codified. |
getEncoded | public byte[] getEncoded()(Code) | | Returns the representation of an Entity in ASN.1
codification.
If the Asn1Entity object was created with an
Entity , then the Entity is codified and
returned as a byte array. On the other hand, if the instance was created
using a byte array, then no codification process is made.
If at construction time an Entity was given, itsrepresentation in ASN.1 codification. If at construction time abyte array was given, a copy of the same array is returned. |
getEntity | public Entity getEntity() throws IOException(Code) | | Returns the Entity obtained from the decodification of an
ASN.1 codified byte array.
If the Asn1Entity was created giving an
Entity , a reference to the same Entity is
obtained. Otherwise, the byte array given at construction time is
decodificated into a new Entity object.
If at construction time an Entity was given, thesame Entity is returned. If at construction time abyte array was given, an Entity constructed withthe information stored in that byte array is returned. throws: IOException - If the decodification process could not be carried outproperly. |
getInstance | static ASN1Type getInstance()(Code) | | It returns an ASN1Type value that contains the ASN.1
codification rules for an Entity with its encoder and
decoder.
Among other things, this method can be used to declare the types of new
fields in other structures, as for example, in an Asn1DTD .
The value that defines an ASN.1 Entity representation with its encoder/decoder. |
|
|