Top Description Methods
org.jvnet.fastinfoset.sax

public Interface EncodingAlgorithmAttributes

extends Attributes
Known Direct Implementers
org.jvnet.fastinfoset.sax.helpers.EncodingAlgorithmAttributesImpl, com.sun.xml.fastinfoset.sax.AttributesHolder
Imports
org.xml.sax.Attributes

Interface for a list of XML attributes that may contain encoding algorithm data.

Implementations shall ensure that the Attributes#getValue(int) method correctly returns a String object even if the attribute is represented as algorithm data.

If an attribute has algorithm data then the getAlgorithmData method shall return a non null value.

See Also
org.jvnet.fastinfoset.sax.FastInfosetReader, org.xml.sax.XMLReader

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

The data. If the index is out of range then null is returned.
getAlgorithmData
(int
The attribute index (zero-based).
index
)

Return the data of the encoding algorithm.

public int

Returns:

The algorithm index. If index is out of range then -1 is returned.
getAlgorithmIndex
(int
The attribute index (zero-based).
index
)

Return the index of the encoding algorithm.

public String

Returns:

The URI. If the index is out of range then null is returned.
getAlgorithmURI
(int
The attribute index (zero-based).
index
)

Return the URI of the encoding algorithm.

public String

Returns:

The alphabet. If the index is out of range then null is returned. If there is is no alphabet then null is returned.
getAlpababet
(int
The attribute index (zero-based).
index
)

Return the alphabet associated with the attribute value.

public boolean

Returns:

True if attribute value should be indexed, otherwise false.
getToIndex
(int
The attribute index (zero-based).
index
)

Return the whether the attribute value should be indexed or not.

Inherited from org.xml.sax.Attributes:
getIndexgetIndexgetLengthgetLocalNamegetQNamegetTypegetTypegetTypegetURIgetValuegetValuegetValue

Method Detail

getAlgorithmDataback to summary
public Object getAlgorithmData(int index)

Return the data of the encoding algorithm.

If the algorithm data corresponds to a built-in encoding algorithm then an Object corresponding to the Java primitive type is returned.

If the algorithm data corresponds to an application-defined encoding algorithm then an Object that is an instance of byte[] is returned if there is no EncodingAlgorithm registered for the application-defined encoding algorithm URI. Otherwise, an Object produced from the registeredEncodingAlgorithm is returned.

If there no encoding algorithm data associated an attribute then null is returned.

Parameters
index:int

The attribute index (zero-based).

Returns:Object

The data. If the index is out of range then null is returned.

getAlgorithmIndexback to summary
public int getAlgorithmIndex(int index)

Return the index of the encoding algorithm.

If getAlgorithmData(int) returns null then the result of this method is undefined.

Parameters
index:int

The attribute index (zero-based).

Returns:int

The algorithm index. If index is out of range then -1 is returned.

See Also
org.jvnet.fastinfoset.EncodingAlgorithmIndexes
getAlgorithmURIback to summary
public String getAlgorithmURI(int index)

Return the URI of the encoding algorithm.

If the algorithm data corresponds to a built-in encoding algorithm then the null is returned.

If the algorithm data corresponds to an application-defined encoding algorithm then the URI of the algorithm is returned.

If getAlgorithmData(int) returns null then the result of this method is undefined.

Parameters
index:int

The attribute index (zero-based).

Returns:String

The URI. If the index is out of range then null is returned.

getAlpababetback to summary
public String getAlpababet(int index)

Return the alphabet associated with the attribute value.

Parameters
index:int

The attribute index (zero-based).

Returns:String

The alphabet. If the index is out of range then null is returned. If there is is no alphabet then null is returned.

getToIndexback to summary
public boolean getToIndex(int index)

Return the whether the attribute value should be indexed or not.

Parameters
index:int

The attribute index (zero-based).

Returns:boolean

True if attribute value should be indexed, otherwise false.