Class AbstractXDBXWriterHandler
java.lang.Object
org.x4o.sax3.io.xdbx.AbstractXDBXWriterHandler
- All Implemented Interfaces:
Closeable, AutoCloseable, ContentHandler
- Direct Known Subclasses:
AbstractXDBXWriterLexical
Writes SAX content handler events as binary XML called XDBX.
- Version:
- 1.0 Dec 19, 2024
- Author:
- Willem Cazander
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates writer which prints to the stream interface. -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char c) voidcharacters(char[] ch, int start, int length) Prints xml characters and uses characters(java.lang.String) method.voidcharacters(String text) Escape and prints xml characters.protected voidcharactersRaw(String text) voidclose()voidcomment(char[] ch, int start, int length) Prints xml comment.voidPrints xml comment.voidvoidendElement(String uri, String localName, String name) voidendPrefixMapping(String prefix) voidignorableWhitespace(char c) Prints xml ignorable whitespace character.voidignorableWhitespace(char[] ch, int start, int length) Prints xml ignorable whitespace.voidignorableWhitespace(String text) Prints xml ignorable whitespace.voidprocessingInstruction(String target, String data) Prints xml instructions.voidsetDocumentLocator(Locator locator) Not implemented.voidskippedEntity(String name) Not implemented.voidvoidstartElement(String uri, String localName, String name, Attributes atts) voidvoidvoidstartElementTag(String uri, String localName, String name) voidstartPrefixMapping(String prefix, String uri) Starts the prefix mapping of an xml namespace uri.protected voidvoidwriteHeaderFlags(OutputStream out, int flags) protected voidwriteLengthValue(byte[] data) protected voidwriteLengthValue(String data) protected voidwriteTag(XDBXContentTag tag) protected voidwriteTagLengthValue(XDBXContentTag tag, String data) protected voidwriteVariableInteger(int i) protected booleanxdbxStringId(String data) protected intxdbxStringStore(String data) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContentHandler
declaration
-
Field Details
-
DEFAULT_PROPERTY_CONFIG
-
OUTPUT_DECLARATION
- See Also:
-
OUTPUT_CHAR_NULL
- See Also:
-
OUTPUT_COMMENT_ENABLE
- See Also:
-
OUTPUT_COMMENT_AUTO_SPACE
- See Also:
-
PROLOG_LICENCE_FILE
- See Also:
-
PROLOG_LICENCE_RESOURCE
- See Also:
-
PROLOG_LICENCE_ENCODING
- See Also:
-
PROLOG_LICENCE_ENABLE
- See Also:
-
PROLOG_USER_COMMENT
- See Also:
-
PROLOG_USER_COMMENT_ENABLE
- See Also:
-
ROOT_START_NAMESPACE_ALL
- See Also:
-
-
Constructor Details
-
AbstractXDBXWriterHandler
Creates writer which prints to the stream interface.- Parameters:
out- The stream to print the xml to.
-
-
Method Details
-
getPropertyConfig
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
xdbxStringId
-
xdbxStringStore
-
startDocument
- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException- See Also:
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException- See Also:
-
startElement
public void startElement(String uri, String localName, String name, Attributes atts) throws SAXException - Specified by:
startElementin interfaceContentHandler- Parameters:
uri- The xml namespace uri.localName- The local name of the xml tag.name- The (full) name of the xml tag.atts- The attributes of the xml tag.- Throws:
SAXException- See Also:
-
startElementTag
- Throws:
SAXException
-
startElementNamespace
- Throws:
SAXException
-
startElementNamespaceAll
- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Parameters:
uri- The xml namespace uri.localName- The local name of the xml tag.name- The (full) name of the xml tag.- Throws:
SAXException- See Also:
-
startPrefixMapping
Starts the prefix mapping of an xml namespace uri.- Specified by:
startPrefixMappingin interfaceContentHandler- Parameters:
prefix- The xml prefix of this xml namespace uri.uri- The xml namespace uri to add the prefix for.- Throws:
SAXException- See Also:
-
endPrefixMapping
- Specified by:
endPrefixMappingin interfaceContentHandler- Parameters:
prefix- The xml prefix of this xml namespace uri to be ended.- Throws:
SAXException- See Also:
-
characters
Prints xml characters and uses characters(java.lang.String) method.- Specified by:
charactersin interfaceContentHandler- Parameters:
ch- Character buffer.start- The start index of the chars in the ch buffer.length- The length index of the chars in the ch buffer.- Throws:
SAXException- When IOException has happend while printing.- See Also:
-
characters
Escape and prints xml characters.- Parameters:
text- The text to write.- Throws:
SAXException- When IOException has happend while printing.- See Also:
-
characters
- Throws:
SAXException
-
charactersRaw
- Throws:
SAXException
-
ignorableWhitespace
Prints xml ignorable whitespace.- Specified by:
ignorableWhitespacein interfaceContentHandler- Parameters:
ch- Character buffer.start- The start index of the chars in the ch buffer.length- The length index of the chars in the ch buffer.- Throws:
SAXException- When IOException has happend while printing.- See Also:
-
ignorableWhitespace
Prints xml ignorable whitespace.- Parameters:
text- The text to print.- Throws:
SAXException- When IOException has happend while printing.- See Also:
-
ignorableWhitespace
Prints xml ignorable whitespace character.- Parameters:
c- The character to print.- Throws:
SAXException- When IOException has happend while printing.
-
processingInstruction
Prints xml instructions.- Specified by:
processingInstructionin interfaceContentHandler- Parameters:
target- The target.data- The data.- Throws:
SAXException- See Also:
-
setDocumentLocator
Not implemented.- Specified by:
setDocumentLocatorin interfaceContentHandler- Parameters:
locator- The DocumentLocator to set.- See Also:
-
skippedEntity
Not implemented.- Specified by:
skippedEntityin interfaceContentHandler- Parameters:
name- The name of the skipped entity.- Throws:
SAXException- See Also:
-
comment
Prints xml comment.- Parameters:
ch- Character buffer.start- The start index of the chars in the ch buffer.length- The length index of the chars in the ch buffer.- Throws:
SAXException- When IOException has happend while printing.- See Also:
-
comment
Prints xml comment.- Parameters:
text- The text to write.- Throws:
SAXException- When IOException has happend while printing.- See Also:
-
writeFlush
- Throws:
SAXException
-
writeHeaderFlags
- Throws:
SAXException
-
writeTag
- Throws:
SAXException
-
writeTagLengthValue
- Throws:
SAXException
-
writeVariableInteger
- Throws:
SAXException
-
writeLengthValue
- Throws:
SAXException
-
writeLengthValue
- Throws:
SAXException
-