| java.lang.Object javax.swing.text.html.parser.Asn1Attributes
Asn1Attributes | class Asn1Attributes (Code) | | It implements ASN.1 codification tools for
javax.swing.text.html.parser.AttributeList . Given an
AttributeList , its values are codified in ASN.1 according to
the following rule:
HTMLElementAttributes ::= SEQUENCE {
Name UTF8String,
Type INTEGER,
Modifier INTEGER,
DefaultValue UTF8String OPTIONAL,
PossibleValues SET OF UTF8String OPTIONAL
}
The class can be used to obtain a byte array representing the codification of
an AttributeList , as well as an AttributeList
from a byte array (previously obtained codifying an AttributeList ).
In fact, it serves as a wrapper for the codification and the
AttributeList itself.
|
Constructor Summary | |
public | Asn1Attributes(byte[] encoded) Constructs a new instance of an Asn1Attributes class from
a byte array. | public | Asn1Attributes(AttributeList att) Constructs a new instance of an Asn1Attributes class from
an AttributeList . |
Method Summary | |
public AttributeList | getAttributeList() Returns the AttributeList obtained from the decodification
of an ASN.1 codified byte array.
If the Asn1Attributes was created giving an
AttributeList , a reference to the same
AttributeList is obtained. | public byte[] | getEncoded() Returns the representation of an AttributeList in ASN.1
codification.
If the Asn1Attributes object was created with an
AttributeList , then the AttributeList is
codified and returned as a byte array. | static ASN1Type | getInstance() It returns an ASN1Type value that contains the ASN.1
codification rules for an AttributeList with its encoder
and decoder. |
Asn1Attributes | public Asn1Attributes(byte[] encoded)(Code) | | Constructs a new instance of an Asn1Attributes class from
a byte array. The byte array received as argument can be later decodified
into an AttributeList .
Parameters: encoded - A byte array containing the codified information of anAttributeList . |
Asn1Attributes | public Asn1Attributes(AttributeList att)(Code) | | Constructs a new instance of an Asn1Attributes class from
an AttributeList . The AttributeList
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: att - The AttributeList to be codified. |
getAttributeList | public AttributeList getAttributeList() throws IOException(Code) | | Returns the AttributeList obtained from the decodification
of an ASN.1 codified byte array.
If the Asn1Attributes was created giving an
AttributeList , a reference to the same
AttributeList is obtained. Otherwise, the byte array given
at construction time is decodificated into a new
AttributeList object.
If at construction time an AttributeList wasgiven, the same AttributeList is returned. If atconstruction time a byte array was given, anAttributeList constructed with the informationstored 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 an AttributeList in ASN.1
codification.
If the Asn1Attributes object was created with an
AttributeList , then the AttributeList 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 AttributeList wasgiven, its representation in ASN.1 codification. If atconstruction time a byte array was given, a copy of the samearray is returned. |
getInstance | static ASN1Type getInstance()(Code) | | It returns an ASN1Type value that contains the ASN.1
codification rules for an AttributeList 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
Asn1Element .
The value that defines an ASN.1 AttributeList representation with its encoder/decoder. |
|
|