Top Description Inners Fields Constructors Methods
com.sun.xml.fastinfoset

public abstract Class Encoder

extends DefaultHandler
implements FastInfosetSerializer
Class Inheritance
All Implemented Interfaces
org.jvnet.fastinfoset.FastInfosetSerializer
Known Direct Subclasses
com.sun.xml.fastinfoset.dom.DOMDocumentSerializer, com.sun.xml.fastinfoset.sax.SAXDocumentSerializer, com.sun.xml.fastinfoset.stax.StAXDocumentSerializer
Imports
com.sun.xml.fastinfoset.algorithm.BuiltInEncodingAlgorithmFactory, com.sun.xml.fastinfoset.org.apache.xerces.util.XMLChar, com.sun.xml.fastinfoset.util.CharArrayIntMap, .KeyIntMap, .LocalNameQualifiedNamesMap, .StringIntMap, com.sun.xml.fastinfoset.vocab.SerializerVocabulary, java.io.IOException, .OutputStream, java.util.Arrays, .HashMap, .Map, org.jvnet.fastinfoset.EncodingAlgorithm, .EncodingAlgorithmException, .EncodingAlgorithmIndexes, .ExternalVocabulary, .FastInfosetException, .FastInfosetSerializer, .RestrictedAlphabet, .VocabularyApplicationData, org.xml.sax.helpers.DefaultHandler

Abstract encoder for developing concrete encoders.

Concrete implementations extending Encoder will utilize methods on Encoder to encode XML infoset according to the Fast Infoset standard. It is the responsibility of the concrete implementation to ensure that methods are invoked in the correct order to produce a valid fast infoset document.

This class extends org.sax.xml.DefaultHandler so that concrete SAX implementations can be used with javax.xml.parsers.SAXParser and the parse methods that take org.sax.xml.DefaultHandler as a parameter.

Buffering of octets that are written to an java.io.OutputStream is supported in a similar manner to a java.io.BufferedOutputStream. Combining buffering with encoding enables better performance.

More than one fast infoset document may be encoded to the java.io.OutputStream.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
protected int
_b

The current octet that is to be written.

private int
protected static final String
_characterEncodingSchemeSystemDefault

Default character encoding scheme system property for the encoding of content and attribute values.

protected char[]
_charBuffer

The internal buffer of characters used for the UTF-8 or UTF-16 encoding of characters.

private byte[]
private int
private final Encoder.EncodingBufferOutputStream
private boolean
_encodingStringsAsUtf8

True if strings for text content and attribute values will be UTF-8 encoded otherwise they will be UTF-16 encoded.

private boolean
_ignoreComments

True if comments shall be ignored.

private boolean
_ignoreDTD

True if DTD and internal subset shall be ignored.

private boolean
_ignoreProcessingInstructions

True if procesing instructions shall be ignored.

private boolean
_ignoreWhiteSpaceTextContent

True if white space characters for text content shall be ignored.

protected int
_markIndex

The current mark in the internal buffer.

private int
_nonIdentifyingStringOnFirstBitCES

Encoding constant generated from the string encoding.

private int
_nonIdentifyingStringOnThirdBitCES

Encoding constant generated from the string encoding.

protected byte[]
_octetBuffer

The internal buffer of bytes.

protected int
_octetBufferIndex

The current position in the internal buffer.

private Map<String, EncodingAlgorithm>
_registeredEncodingAlgorithms

The map of URIs to algorithms.

protected OutputStream
_s

The java.io.OutputStream that the encoded XML infoset (the fast infoset document) is written to.

protected boolean
_terminate

True if terminatation of an information item is required

private boolean
_useLocalNameAsKeyForQualifiedNameLookup

True, if the local name string is used as the key to find the associated set of qualified names.

protected SerializerVocabulary
_v

The vocabulary that is used by the encoder

protected VocabularyApplicationData
_vData

The vocabulary application data that is used by the encoder

private boolean
_vIsInternal

True if the vocubulary is internal to the encoder

protected int
attributeValueMapTotalCharactersConstraint

The limit on the size of indexed Map for attribute values Limit is measured in characters number

public static final String
CHARACTER_ENCODING_SCHEME_SYSTEM_PROPERTY

Character encoding scheme system property for the encoding of content and attribute values.

protected int
characterContentChunkMapTotalCharactersConstraint

The limit on the size of indexed Map for character content chunks Limit is measured in characters number

private static int[]
protected int
maxAttributeValueSize

The maximum size of [normalized value] of Attribute Information Items that will be indexed.

protected int
maxCharacterContentChunkSize

The maximum size of character content chunks of Character Information Items or Comment Information Items that will be indexed.

protected int
minAttributeValueSize

The minimum size of [normalized value] of Attribute Information Items that will be indexed.

protected int
minCharacterContentChunkSize

The minimum size of character content chunks of Character Information Items or Comment Information Items that will be indexed.

private static int[]

Constructor Summary

AccessConstructor and Description
protected
Encoder()

Default constructor for the Encoder.

protected
Encoder(boolean useLocalNameAsKeyForQualifiedNameLookup)

Method Summary

Modifier and TypeMethod and Description
private void
public boolean

Returns:

whether attribute map has enough memory
canAddAttributeToTable
(int
the length of attribute value is checking to be added to Map.
length
)

Checks whether attribute table has enough memory to store attribute value with the given length

public boolean

Returns:

whether character content map has enough memory
canAddCharacterContentToTable
(int
the length of character content chunk is checking to be added to Map.
length
,
CharArrayIntMap
the custom CharArrayIntMap, which memory limits will be checked.
map
)

Checks whether character content table has enough memory to store character content chunk with the given length

protected final void
encodeAIIBuiltInAlgorithmData(int
the built in encoding algorithm identifier.
id
,
Object
the data to be encoded using an encoding algorithm. The data represents an array of items specified by the encoding algorithm identifier
data
,
int
the offset into the array of bytes.
offset
,
int
the length of bytes.
length
)

Encode the [normalized value] of an Attribute Information Item using using a built in encoding algorithm.Implementation of clause C.14 of ITU-T Rec.

protected final void
encodeAIIObjectAlgorithmData(int
the encoding algorithm identifier.
id
,
Object
the data to be encoded using an encoding algorithm.
data
,
EncodingAlgorithm
the encoding algorithm to use to encode the data into an array of bytes.
ea
)

Encode the [normalized value] of an Attribute Information Item using using an encoding algorithm.Implementation of clause C.14 of ITU-T Rec.X.891 | ISO/IEC 24824-1.

protected final void
encodeAIIOctetAlgorithmData(int
the encoding algorithm identifier.
id
,
byte[]
the data, as an array of bytes, to be encoded.
d
,
int
the offset into the array of bytes.
offset
,
int
the length of bytes.
length
)

Encode the [normalized value] of an Attribute Information Item using using an encoding algorithm.Implementation of clause C.14 of ITU-T Rec.

protected final void
encodeAlphabetCharacters(String
the alphabet defining the mapping between characters and integer values.
alphabet
,
char[]
the array of characters.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters.
length
,
boolean
if characters should be added to table
addToTable
)

Encode a chunk of Character Information Items using a restricted alphabet table.

protected final void
encodeAttributeQualifiedNameOnSecondBit(String
the namespace URI of the qualified name.
namespaceURI
,
String
the prefix of the qualified name.
prefix
,
String
the local name of the qualified name.
localName
)

Encode a qualified name of an Attribute Informaiton Item on the third bit of an octet.Implementation of clause C.17 of ITU-T Rec.

private void
encodeCharacterAsUtf8FourByte(int c, char[] ch, int chpos, int chend, int bpos)

protected final void
encodeCharacters(char[]
the array of characters.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters.
length
)

Encode a chunk of Character Information Items.

protected final void
encodeCharactersNoClone(char[]
the array of characters.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters.
length
)

Encode a chunk of Character Information Items.

protected final void
encodeCIIBuiltInAlgorithmData(int
the built in encoding algorithm identifier.
id
,
Object
the data to be encoded using an encoding algorithm. The data represents an array of items specified by the encoding algorithm identifier
data
,
int
the offset into the array of bytes.
offset
,
int
the length of bytes.
length
)

Encode a chunk of Character Information Items using using an encoding algorithm.Implementation of clause C.15 of ITU-T Rec.X.891 | ISO/IEC 24824-1.

protected final void
encodeCIIBuiltInAlgorithmDataAsCDATA(char[]
the array of characters.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters.
length
)

Encode a chunk of Character Information Items using using the CDATA built in encoding algorithm.Implementation of clause C.15 of ITU-T Rec.X.891 | ISO/IEC 24824-1.

protected final void
encodeCIIObjectAlgorithmData(int
the encoding algorithm identifier.
id
,
Object
the data to be encoded using an encoding algorithm.
data
,
EncodingAlgorithm
the encoding algorithm to use to encode the data into an array of bytes.
ea
)

Encode a chunk of Character Information Items using using an encoding algorithm.Implementation of clause C.15 of ITU-T Rec.X.891 | ISO/IEC 24824-1.

protected final void
encodeCIIOctetAlgorithmData(int
the encoding algorithm identifier.
id
,
byte[]
the data, as an array of bytes, to be encoded.
d
,
int
the offset into the array of bytes.
offset
,
int
the length of bytes.
length
)

Encode a chunk of Character Information Items using using an encoding algorithm.Implementation of clause C.15 of ITU-T Rec.

protected final void
encodeComment(char[]
the array of characters that is as comment.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters.
length
)

Encode a Comment Information Item.

protected final void
encodeCommentNoClone(char[]
the array of characters.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters.
length
)

Encode a Comment Information Item.If the array of characters that is a comment is to be indexed (as determined by isCharacterContentChunkLengthMatchesLimit(int)) then the array is not cloned when adding the array to the vocabulary.

protected final void
encodeDateTimeFourBitCharacters(char[]
the array of characters.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters.
length
,
boolean
if characters should be added to table.
addToTable
)

Encode a chunk of Character Information Items using a date-time alphabet that results in the encoding of a character in 4 bits (or two characters per octet).

protected final void
encodeDateTimeNonIdentifyingStringOnFirstBit(String s, boolean addToTable, boolean mustBeAddedToTable)

protected final void
encodeDocumentTermination()

Encode the termination of the Document Information Item.

protected final void
encodeDocumentTypeDeclaration(String
the system identifier of the external subset.
systemId
,
String
the public identifier of the external subset.
publicId
)

Encode a Document Type Declaration.

protected final void
encodeElementQualifiedNameOnThirdBit(String
the namespace URI of the qualified name.
namespaceURI
,
String
the prefix of the qualified name.
prefix
,
String
the local name of the qualified name.
localName
)

Encode a qualified name of an Element Information Item on the third bit of an octet.Implementation of clause C.18 of ITU-T Rec.

protected final void
encodeElementTermination()

Encode the termination of an Element Information Item.

protected final void
encodeFourBitCharacters(int
the restricted alphabet identifier.
id
,
int[]
the table mapping characters to 4 bit values.
table
,
char[]
the array of characters.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters.
length
,
boolean
if characters should be added to table.
addToTable
)

Encode a chunk of Character Information Items using a restricted alphabet that results in the encoding of a character in 4 bits (or two characters per octet).

protected final void
encodeHeader(boolean
true if the XML declaration should be encoded.
encodeXmlDecl
)

Encode the header of a fast infoset document.

protected final void
encodeIdentifyingNonEmptyStringOnFirstBit(String
the identifying string.
s
,
StringIntMap
the vocabulary table to use to determin the index of the identifying string
map
)

Encode a non empty identifying string on the first bit of an octet.Implementation of clause C.13 of ITU-T Rec.

protected final void
encodeInitialVocabulary()

Encode the initial vocabulary of a fast infoset document.

protected final boolean

Returns:

localName the local name of the qualified name.
encodeLiteralAttributeQualifiedNameOnSecondBit
(String
the namespace URI of the qualified name.
namespaceURI
,
String
the prefix of the qualified name.
prefix
,
String
the local name of the qualified name.
localName
,
LocalNameQualifiedNamesMap.Entry entry)

Encode a literal qualified name of an Attribute InforImplementation of clause C.17 of ITU-T Rec.maiton IX.891 | ISO/IEC 24824-1.ause C.17 of ITU-T Rec.X.891 | ISO/IEC 24824-1.

protected final void
encodeLiteralElementQualifiedNameOnThirdBit(String
the namespace URI of the qualified name.
namespaceURI
,
String
the prefix of the qualified name.
prefix
,
String localName, LocalNameQualifiedNamesMap.Entry entry)

Encode a literal qualified name of an Element InforImplementation of clause C.18 of ITU-T Rec.maiton IX.891 | ISO/IEC 24824-1.ause C.18 of ITU-T Rec.X.891 | ISO/IEC 24824-1.

protected final void
encodeNamespaceAttribute(String
the prefix of the namespace declaration, if "" then there is no prefix for the namespace declaration.
prefix
,
String
the URI of the namespace declaration, if "" then there is no URI for the namespace declaration.
uri
)

Encode a Attribute Information Item that is a namespace declaration.

protected final void
encodeNonEmptyCharacterStringOnFifthBit(String
the string.
s
)

Encode a non empty string on the fifth bit of an octet using the UTF-8 or UTF-16 encoding.Implementation of clause C.23 of ITU-T Rec.

protected final void
encodeNonEmptyCharacterStringOnFifthBit(char[]
the array of characters.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters.
length
)

Encode a non empty string on the fifth bit of an octet using the UTF-8 or UTF-16 encoding.Implementation of clause C.23 of ITU-T Rec.

protected final void
encodeNonEmptyCharacterStringOnSeventhBit(char[]
the array of characters.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters.
length
)

Encode a non empty string on the seventh bit of an octet using the UTF-8 or UTF-16 encoding.Implementation of clause C.24 of ITU-T Rec.

protected final void
encodeNonEmptyFourBitCharacterString(int[] table, char[] ch, int offset, int octetPairLength, int octetSingleLength)

protected final void
encodeNonEmptyFourBitCharacterStringOnSeventhBit(int[]
the table mapping characters to 4 bit values.
table
,
char[]
the array of characters.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters.
length
)

Encode a non empty string on the seventh bit of an octet using a restricted alphabet that results in the encoding of a character in 4 bits (or two characters per octet).Implementation of clause C.24 of ITU-T Rec.X.891 | ISO/IEC 24824-1.

protected final void
encodeNonEmptyNBitCharacterStringOnSeventhBit(String
the alphabet defining the mapping between characters and integer values.
alphabet
,
char[]
the array of characters.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters.
length
)

Encode a non empty string on the seventh bit of an octet using a restricted alphabet table.Implementation of clause C.24 of ITU-T Rec.X.891 | ISO/IEC 24824-1.

protected final void
encodeNonEmptyOctetStringOnSecondBit(String
the string.
s
)

Encode a non empty string on the second bit of an octet using the UTF-8 encoding.Implementation of clause C.22 of ITU-T Rec.

protected final void
encodeNonEmptyUTF8StringAsOctetString(int
the current octet that is being written.
b
,
String
the string to be UTF-8 encoded.
s
,
int[]
the array of constants to use when encoding to determin how the length of the UTF-8 encoded string is encoded.
constants
)

Encode a non empty string using the UTF-8 encoding.

protected final void
encodeNonEmptyUTF8StringAsOctetString(int
the current octet that is being written.
b
,
char[]
the array of characters.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters. how the length of the UTF-8 encoded string is encoded.
length
,
int[]
the array of constants to use when encoding to determin how the length of the UTF-8 encoded string is encoded.
constants
)

Encode a non empty string using the UTF-8 encoding.

protected final void
encodeNonIdentifyingStringOnFirstBit(String
the string to encode
s
,
StringIntMap
the vocabulary table of strings to indexes.
map
,
boolean
true if the string could be added to the vocabulary table (if table has enough memory)
addToTable
,
boolean
true if the string must be added to the vocabulary table (if not already present in the table).
mustBeAddedToTable
)

Encode a non identifying string on the first bit of an octet.Implementation of clause C.14 of ITU-T Rec.

protected final void
encodeNonIdentifyingStringOnFirstBit(String
the string to encode
s
,
CharArrayIntMap
the vocabulary table of character arrays to indexes.
map
,
boolean
true if the string should be added to the vocabulary table (if not already present in the table).
addToTable
)

Encode a non identifying string on the first bit of an octet.Implementation of clause C.14 of ITU-T Rec.

protected final void
encodeNonIdentifyingStringOnFirstBit(char[]
the array of characters.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters.
length
,
CharArrayIntMap
the vocabulary table of character arrays to indexes.
map
,
boolean
true if the string should be added to the vocabulary table (if not already present in the table).
addToTable
,
boolean
true if the array of characters should be cloned if added to the vocabulary table.
clone
)

Encode a non identifying string on the first bit of an octet.Implementation of clause C.14 of ITU-T Rec.

protected final void
encodeNonIdentifyingStringOnFirstBit(int id, int[] table, String s, boolean addToTable, boolean mustBeAddedToTable)

protected final void
encodeNonIdentifyingStringOnFirstBit(String
the encoding algorithm URI. If the URI == null then the encoding algorithm identifier takes precendence.
URI
,
int
the encoding algorithm identifier.
id
,
Object
the data to be encoded using an encoding algorithm.
data
)

Encode a non identifying string on the first bit of an octet as binary data using an encoding algorithm.Implementation of clause C.14 of ITU-T Rec.

protected final void
encodeNonIdentifyingStringOnThirdBit(char[]
the array of characters.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters.
length
,
CharArrayIntMap
the vocabulary table of character arrays to indexes.
map
,
boolean
true if the array of characters should be added to the vocabulary table (if not already present in the table).
addToTable
,
boolean
true if the array of characters should be cloned if added to the vocabulary table.
clone
)

Encode a non identifying string on the third bit of an octet.Implementation of clause C.15 of ITU-T Rec.

protected final void
encodeNonIdentifyingStringOnThirdBit(String
the encoding algorithm URI. If the URI == null then the encoding algorithm identifier takes precendence.
URI
,
int
the encoding algorithm identifier.
id
,
Object
the data to be encoded using an encoding algorithm.
data
)

Encode a non identifying string on the third bit of an octet as binary data using an encoding algorithm.Implementation of clause C.15 of ITU-T Rec.

protected final void
encodeNonIdentifyingStringOnThirdBit(String
the encoding algorithm URI. If the URI == null then the encoding algorithm identifier takes precendence.
URI
,
int
the encoding algorithm identifier.
id
,
byte[]
the data, as an array of bytes, to be encoded.
d
,
int
the offset into the array of bytes.
offset
,
int
the length of bytes.
length
)

Encode a non identifying string on the third bit of an octet as binary data using an encoding algorithm.Implementation of clause C.15 of ITU-T Rec.

protected final void
encodeNonZeroInteger(int
the current octet that is being written.
b
,
int
the non zero integer.
i
,
int[]
the array of constants to use when encoding to determin how the non zero integer is encoded.
constants
)

Encode a non zero integer.

protected final void
encodeNonZeroIntegerOnFourthBit(int
The integer to encode, which is a member of the interval [0, 1048575]. In the specification the interval is [1, 1048576]
i
)

Encode a non zero integer on the fourth bit of an octet.Implementation of clause C.28 of ITU-T Rec.

protected final void
encodeNonZeroIntegerOnSecondBitFirstBitOne(int
The integer to encode, which is a member of the interval [0, 1048575]. In the specification the interval is [1, 1048576]
i
)

Encode a non zero integer on the second bit of an octet, setting the first bit to 1.Implementation of clause C.24 of ITU-T Rec.

protected final void
encodeNonZeroIntegerOnSecondBitFirstBitZero(int
The integer to encode, which is a member of the interval [0, 1048575]. In the specification the interval is [1, 1048576]
i
)

Encode a non zero integer on the second bit of an octet, setting the first bit to 0.Implementation of clause C.25 of ITU-T Rec.

protected final void
encodeNonZeroIntegerOnThirdBit(int
The integer to encode, which is a member of the interval [0, 1048575]. In the specification the interval is [1, 1048576]
i
)

Encode a non zero integer on the third bit of an octet.Implementation of clause C.27 of ITU-T Rec.

protected final void
encodeNonZeroOctetStringLength(int
the current octet that is being written.
b
,
int
the length of the UTF-8 encoded string. how the length of the UTF-8 encoded string is encoded.
length
,
int[]
the array of constants to use when encoding to determin how the length of the UTF-8 encoded string is encoded.
constants
)

Encode the length of non empty UTF-8 encoded string.

protected final void
encodeNonZeroOctetStringLengthOnFifthBit(int
the length to encode.
length
)

Encode the length of a UTF-8 or UTF-16 encoded string on the fifth bit of an octet.Implementation of clause C.23 of ITU-T Rec.

protected final void
encodeNonZeroOctetStringLengthOnSecondBit(int
the length to encode.
length
)

Encode the length of a UTF-8 encoded string on the second bit of an octet.Implementation of clause C.22 of ITU-T Rec.

protected final void
encodeNonZeroOctetStringLengthOnSenventhBit(int
the length to encode.
length
)

Encode the length of a encoded string on the seventh bit of an octet.Implementation of clause C.24 of ITU-T Rec.

protected final void
encodeNumericFourBitCharacters(char[]
the array of characters.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters.
length
,
boolean
if characters should be added to table.
addToTable
)

Encode a chunk of Character Information Items using a numeric alphabet that results in the encoding of a character in 4 bits (or two characters per octet).

protected final void
encodeNumericNonIdentifyingStringOnFirstBit(String s, boolean addToTable, boolean mustBeAddedToTable)

protected final void
encodeProcessingInstruction(String
the target of the processing instruction.
target
,
String
the data of the processing instruction.
data
)

Encode a Processing Instruction Information Item.

protected final void
encodeTermination()

Encode a termination if required.

protected final int
encodeUtf16String(String
the string to encode.
s
)

Encode a string using the UTF-16 encoding.

protected final int
encodeUtf16String(char[]
the array of characters.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters.
length
)

Encode a string using the UTF-16 encoding.

protected final int
encodeUTF8String(String
the string to encode.
s
)

Encode a string using the UTF-8 encoding.

protected final int
encodeUTF8String(char[]
the array of characters.
ch
,
int
the offset into the array of characters.
offset
,
int
the length of characters.
length
)

Encode a string using the UTF-8 encoding.

private void
private void
private void
ensureSize(int length)

public int
getAttributeValueMapMemoryLimit()

Implements org.jvnet.fastinfoset.FastInfosetSerializer.getAttributeValueMapMemoryLimit.

Gets the limit on the memory size of Map of attribute values that will be indexed.

public int
getCharacterContentChunkMapMemoryLimit()

Implements org.jvnet.fastinfoset.FastInfosetSerializer.getCharacterContentChunkMapMemoryLimit.

Gets the limit on the memory size, allocated for indexed character content chunks.

public String
private static String
public final boolean
public final boolean
public final boolean
public final boolean
public int
getMaxAttributeValueSize()

Implements org.jvnet.fastinfoset.FastInfosetSerializer.getMaxAttributeValueSize.

Gets the maximum size of attribute values that will be indexed.

public int
getMaxCharacterContentChunkSize()

Implements org.jvnet.fastinfoset.FastInfosetSerializer.getMaxCharacterContentChunkSize.

Gets the maximum size of character content chunks that might be indexed.

public int
getMinAttributeValueSize()

Implements org.jvnet.fastinfoset.FastInfosetSerializer.getMinAttributeValueSize.

Gets the minimum size of attribute values that will be indexed.

public int
getMinCharacterContentChunkSize()

Implements org.jvnet.fastinfoset.FastInfosetSerializer.getMinCharacterContentChunkSize.

Gets the minimum size of character content chunks that will be indexed.

public static String

Returns:

the prefix, or "" if there is no prefix.
getPrefixFromQualifiedName
(String
the qualified name
qName
)

Obtain the prefix from a qualified name.

public Map<String, EncodingAlgorithm>
public VocabularyApplicationData
getVocabularyApplicationData()

Implements org.jvnet.fastinfoset.FastInfosetSerializer.getVocabularyApplicationData.

Get the application data associated with the serializer vocabulary.

protected final boolean
hasMark()

Returns: true if the mark has been set, otherwise false if the mark has not been set.

public boolean

Returns:

whether attribute value matches limit
isAttributeValueLengthMatchesLimit
(int
the length of attribute
length
)

Checks whether attribute value (its length) matches length limit

public boolean

Returns:

whether character content chunk length matches limit
isCharacterContentChunkLengthMatchesLimit
(int
the length of character content chunk is checking to be added to Map.
length
)

Checks whether character content chunk (its length) matches length limit

public static boolean

Returns:

true if all characters are white space, false otherwise
isWhiteSpace
(final char[]
the character array
ch
,
int
the starting character index into the array to check from
start
,
final int
the number of characters to check
length
)

Check if character array contains characters that are all white space.

public static boolean

Returns:

true if all characters are white space, false otherwise
isWhiteSpace
(String
the string
s
)

Check if a String contains characters that are all white space.

protected final void
mark()

Mark the current position in the buffered stream.

private static int
maxCharacter(String alphabet)

public void
reset()

Implements org.jvnet.fastinfoset.FastInfosetSerializer.reset.

Reset the encoder for reuse encoding another XML infoset.

private void
protected final void
resetMark()

Reset the marked position in the buffered stream.

private void
resize(int length)

public void
setAttributeValueMapMemoryLimit(int size)

Implements org.jvnet.fastinfoset.FastInfosetSerializer.setAttributeValueMapMemoryLimit.

Sets the limit on the memory size of Map of attribute values that will be indexed.

public void
setCharacterContentChunkMapMemoryLimit(int size)

Implements org.jvnet.fastinfoset.FastInfosetSerializer.setCharacterContentChunkMapMemoryLimit.

Sets the limit on the memory size, allocated for indexed character content chunks.

public final void
setCharacterEncodingScheme(String characterEncodingScheme)

Implements org.jvnet.fastinfoset.FastInfosetSerializer.setCharacterEncodingScheme.

Sets the character encoding scheme.

public void
setExternalVocabulary(ExternalVocabulary v)

Implements org.jvnet.fastinfoset.FastInfosetSerializer.setExternalVocabulary.

Set the external vocabulary that shall be used when serializing.

public final void
public final void
public final void
public final void
public void
setMaxAttributeValueSize(int size)

Implements org.jvnet.fastinfoset.FastInfosetSerializer.setMaxAttributeValueSize.

Sets the maximum size of attribute values that will be indexed.

public void
setMaxCharacterContentChunkSize(int size)

Implements org.jvnet.fastinfoset.FastInfosetSerializer.setMaxCharacterContentChunkSize.

Sets the maximum size of character content chunks that might be indexed.

public void
setMinAttributeValueSize(int size)

Implements org.jvnet.fastinfoset.FastInfosetSerializer.setMinAttributeValueSize.

Sets the minimum size of attribute values that will be indexed.

public void
setMinCharacterContentChunkSize(int size)

Implements org.jvnet.fastinfoset.FastInfosetSerializer.setMinCharacterContentChunkSize.

Sets the minimum size of character content chunks that will be indexed.

public void
setOutputStream(OutputStream
the OutputStream where the fast infoset document is written to.
s
)

Implements org.jvnet.fastinfoset.FastInfosetSerializer.setOutputStream.

Set the OutputStream to encode the XML infoset to a fast infoset document.

public void
public void
setVocabulary(SerializerVocabulary
the vocabulary to be used for encoding.
vocabulary
)

Set the SerializerVocabulary to be used for encoding.

public void
setVocabularyApplicationData(VocabularyApplicationData data)

Implements org.jvnet.fastinfoset.FastInfosetSerializer.setVocabularyApplicationData.

Set the application data to be associated with the serializer vocabulary.

protected final void
write(int i)

Write a byte to the buffered stream.

protected final void
write(byte[]
the array of bytes.
b
,
int
the length of bytes.
length
)

Write an array of bytes to the buffered stream.

protected final void
write(byte[]
the array of bytes.
b
,
int
the offset into the array of bytes.
offset
,
int
the length of bytes.
length
)

Write an array of bytes to the buffered stream.

private void
writeBits(int bits, int v)

Inherited from org.xml.sax.helpers.DefaultHandler:
charactersendDocumentendElementendPrefixMappingerrorfatalErrorignorableWhitespacenotationDeclprocessingInstructionresolveEntitysetDocumentLocatorskippedEntitystartDocumentstartElementstartPrefixMappingunparsedEntityDeclwarning