Package com.sun.xml.stream.buffer
Class AttributesHolder
java.lang.Object
com.sun.xml.stream.buffer.AttributesHolder
- All Implemented Interfaces:
Attributes
Class for holding attributes.
Since it implements
Attributes
, this class follows the SAX convention
of using "" instead of null.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private String[]
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
Add an attribute using a prefix.final void
Add an attribute using a qualified name that contains the prefix and local name.final void
clear()
final int
final int
final int
final String
getLocalName
(int index) final String
getPrefix
(int index) final String
getQName
(int index) final String
getType
(int index) final String
final String
final String
getURI
(int index) final String
getValue
(int index) final String
final String
private void
resize
(int length)
-
Field Details
-
DEFAULT_CAPACITY
private static final int DEFAULT_CAPACITY- See Also:
-
ITEM_SIZE
private static final int ITEM_SIZE- See Also:
-
PREFIX
private static final int PREFIX- See Also:
-
URI
private static final int URI- See Also:
-
LOCAL_NAME
private static final int LOCAL_NAME- See Also:
-
QNAME
private static final int QNAME- See Also:
-
TYPE
private static final int TYPE- See Also:
-
VALUE
private static final int VALUE- See Also:
-
_attributeCount
private int _attributeCount -
_strings
-
-
Constructor Details
-
AttributesHolder
public AttributesHolder()
-
-
Method Details
-
getLength
public final int getLength()- Specified by:
getLength
in interfaceAttributes
-
getPrefix
-
getLocalName
- Specified by:
getLocalName
in interfaceAttributes
-
getQName
- Specified by:
getQName
in interfaceAttributes
-
getType
- Specified by:
getType
in interfaceAttributes
-
getURI
- Specified by:
getURI
in interfaceAttributes
-
getValue
- Specified by:
getValue
in interfaceAttributes
-
getIndex
- Specified by:
getIndex
in interfaceAttributes
-
getType
- Specified by:
getType
in interfaceAttributes
-
getValue
- Specified by:
getValue
in interfaceAttributes
-
getIndex
- Specified by:
getIndex
in interfaceAttributes
-
getType
- Specified by:
getType
in interfaceAttributes
-
getValue
- Specified by:
getValue
in interfaceAttributes
-
clear
public final void clear() -
addAttributeWithQName
public final void addAttributeWithQName(String uri, String localName, String qName, String type, String value) Add an attribute using a qualified name that contains the prefix and local name.- Parameters:
uri
- This can be empty but not null, just like everywhere else in SAX.
-
addAttributeWithPrefix
public final void addAttributeWithPrefix(String prefix, String uri, String localName, String type, String value) Add an attribute using a prefix.- Parameters:
prefix
- This can be empty but not null, just like everywhere else in SAX.uri
- This can be empty but not null, just like everywhere else in SAX.
-
resize
private void resize(int length)
-