![]() |
|
Contents |
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.
Public Member Functions | |
| Asn1Attributes (byte[] encoded) | |
Constructs a new instance of an Asn1Attributes class from a byte array. | |
| Asn1Attributes (AttributeList att) | |
Constructs a new instance of an Asn1Attributes class from an AttributeList. | |
| byte[] | getEncoded () |
Returns the representation of an AttributeList in ASN.1 codification. | |
| AttributeList | getAttributeList () throws IOException |
Returns the AttributeList obtained from the decodification of an ASN.1 codified byte array. | |
Static Package Functions | |
| [static initializer] | |
The definition of the ASN1_ATTRIBUTES type according to the rule defined for an AttributeList. | |
| static ASN1Type | getInstance () |
It returns an ASN1Type value that contains the ASN.1 codification rules for an AttributeList with its encoder and decoder. | |
Static Private Member Functions | |
| static Vector | lst2vector (List lst) |
Converts a list of String into a vector of String. | |
Private Attributes | |
| AttributeList | att |
An internal copy of the AttributeList to be codified. | |
| byte[] | encoded |
An internal copy of the byte array which contains the codification of an AttributeList. | |
Static Private Attributes | |
| static ASN1Type | ASN1_ATTRIBUTES |
It stores the definition of an AttributeList as an ASN.1 valid type according to the ASN.1 framework. | |
| Asn1Attributes | ( | byte[] | encoded | ) |
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.
| encoded | A byte array containing the codified information of an AttributeList. |
| Asn1Attributes | ( | AttributeList | att | ) |
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.
| att | The AttributeList to be codified. |
| [static initializer] | ( | ) | [static, package] |
The definition of the ASN1_ATTRIBUTES type according to the rule defined for an AttributeList.
It also defines a custom encoder/decoder for this type.
Overrided method used to decodified the information that represents an AttributeList. It makes a completely new AttributeList with the information interpreted from the stream.
Note that the information related with the next AttributeList in the chain is managed in the Asn1Element class. For this reason, from this method, the next field is always set to null.
| in | The BerInputStream where the codified information will be read from. |
AttributeList filled with the information read from the stream.AttributeList into an array of bytes, according to its ASN.1 specification.
| object | The object where the information to be codified is stored. It actually consists of an Asn1Attributes object which contains the AttributeList to be codified. | |
| values | An array of objects where the attributes' name, type, modifier, default value and possibles allowed values information will be stored, ready for codification. |
| static ASN1Type getInstance | ( | ) | [static, package] |
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.
AttributeList representation with its encoder/decoder. | 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. On the other hand, if the instance was created using a byte array, then no codification process is made.
AttributeList was given, its representation in ASN.1 codification. If at construction time a byte array was given, a copy of the same array is returned. | AttributeList getAttributeList | ( | ) | throws IOException |
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.
AttributeList was given, the same AttributeList is returned. If at construction time a byte array was given, an AttributeList constructed with the information stored in that byte array is returned. | IOException | If the decodification process could not be carried out properly. |
| static Vector lst2vector | ( | List | lst | ) | [static, private] |
Converts a list of String into a vector of String.
| lst | The list of String to be converted. |
Vector containing the Strings stored in the List received as argument.
ASN1Type ASN1_ATTRIBUTES [static, private] |
It stores the definition of an AttributeList as an ASN.1 valid type according to the ASN.1 framework.
AttributeList att [private] |
An internal copy of the AttributeList to be codified.
byte [] encoded [private] |
An internal copy of the byte array which contains the codification of an AttributeList.
From this variable, the information used to decodify an AttributeList is read from.