| java.lang.Object javax.swing.text.html.parser.Asn1Dtd
Asn1Dtd | class Asn1Dtd (Code) | | It implements ASN.1 codification tools for
javax.swing.text.html.parser.DTD . Given an DTD ,
its values are codified in ASN.1 according to the following rule:
BDTD ::= SEQUENCE {
Name UTF8String,
Entity SET OF HTMLEntity,
Element SET OF HTMLElement
}
The class can be used to obtain a byte array representing the codification of
a DTD , as well as a DTD from a byte array
(previously obtained codifying a DTD ). In fact, it serves as a
wrapper for the codification and the DTD itself.
|
Constructor Summary | |
public | Asn1Dtd(byte[] encoded) Constructs a new instance of a Asn1Dtd class from a byte
array. | public | Asn1Dtd(DTD dtd) Constructs a new instance of an Asn1Dtd class from a
DTD . |
Method Summary | |
public DTD | getDTD(DTD refDTD) Returns the DTD obtained from the decodification of an
ASN.1 codified byte array.
If the Asn1Dtd was created giving a DTD , a
reference to the same DTD is obtained. | public byte[] | getEncoded() Returns the representation of a DTD in ASN.1 codification.
If the Asn1Dtd object was created with a DTD ,
then the DTD is codified and returned as a byte array. | static ASN1Type | getInstance() It returns an ASN1Type value that contains the ASN.1
codification rules for a DTD with its encoder and decoder. |
Asn1Dtd | public Asn1Dtd(byte[] encoded)(Code) | | Constructs a new instance of a Asn1Dtd class from a byte
array. The byte array received as argument can be later decodified into a
DTD .
Parameters: encoded - A byte array containing the codified information of aDTD . |
Asn1Dtd | public Asn1Dtd(DTD dtd)(Code) | | Constructs a new instance of an Asn1Dtd class from a
DTD . The DTD 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: dtd - The DTD to be codified. |
getDTD | public DTD getDTD(DTD refDTD) throws IOException(Code) | | Returns the DTD obtained from the decodification of an
ASN.1 codified byte array.
If the Asn1Dtd was created giving a DTD , a
reference to the same DTD is obtained. Otherwise, the byte
array given at construction time is decodificated into a new
DTD object.
If at construction time a DTD was given, the sameDTD is returned. If at construction time a bytearray was given, a DTD constructed with theinformation stored in that byte array is returned. throws: IOException - If the decodification process could not be carried outproperly. |
getEncoded | public byte[] getEncoded()(Code) | | Returns the representation of a DTD in ASN.1 codification.
If the Asn1Dtd object was created with a DTD ,
then the DTD 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 a DTD was given, itsrepresentation in ASN.1 codification. If at construction time abyte array was given, a copy of the same array is returned. |
getInstance | static ASN1Type getInstance()(Code) | | It returns an ASN1Type value that contains the ASN.1
codification rules for a DTD with its encoder and decoder.
The value that defines an ASN.1 DTD representationwith its encoder/decoder. |
|
|