This interface provides additional stream-based serialization methods for the case where an application is in specific control of the serialization process and has the knowledge to call the LowLevel methods in the required order.
For example, the application may be able to perform efficient information to indexing mapping and to provide certain information in UTF-8 encoded form.
These methods may be used in conjunction with javax.
as long as an element fragment written using the efficient streaming methods
are self-contained and no sub-fragment is written using methods from
javax..
The required call sequence is as follows:
CALLSEQUENCE :=startDocumentinitiateLowLevelWriting ELEMENTendDocument| initiateLowLevelWriting ELEMENT // for fragment ELEMENT := writeLowLevelTerminationAndMark NAMESPACES? ELEMENT_NAME ATTRIBUTES? writeLowLevelEndStartElement CONTENTS writeLowLevelEndElement NAMESPACES := writeLowLevelStartNamespaces writeLowLevelNamespace* writeLowLevelEndNamespaces ELEMENT_NAME := writeLowLevelStartElementIndexed | writeLowLevelStartNameLiteral | writeLowLevelStartElement ATTRUBUTES := writeLowLevelStartAttributes (ATTRIBUTE_NAME writeLowLevelAttributeValue)* ATTRIBUTE_NAME := writeLowLevelAttributeIndexed | writeLowLevelStartNameLiteral | writeLowLevelAttribute CONTENTS := (ELEMENT | writeLowLevelText writeLowLevelOctets)*
Some methods defer to the application for the mapping of information to indexes.
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: the index.Get the current index that was applied to an [local name] of an Element or Attribute Information Item. |
| public int | Returns: the index.Get the next index to apply to an Attribute Information Item. |
| public int | |
| public int | Returns: the index.Get the next index to apply to an [local name] of an Element or Attribute Information Item. |
| public void | |
| public boolean | Returns: true if attribute is indexed, otherwise false.Write an attribute. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public boolean | Returns: true if element is indexed, otherwise false.Write the start of an element. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void |
| getLocalNameIndex | back to summary |
|---|---|
| public int getLocalNameIndex() Get the current index that was applied to an [local name] of an Element or Attribute Information Item.
| |
| getNextAttributeIndex | back to summary |
|---|---|
| public int getNextAttributeIndex() Get the next index to apply to an Attribute Information Item. This will increment the next obtained index such that: i = w.getNextAttributeIndex(); j = w.getNextAttributeIndex(); i == j + 1;
| |
| getNextElementIndex | back to summary |
|---|---|
| public int getNextElementIndex() Get the next index to apply to an Element Information Item. This will increment the next obtained index such that: i = w.getNextElementIndex(); j = w.getNextElementIndex(); i == j + 1;
| |
| getNextLocalNameIndex | back to summary |
|---|---|
| public int getNextLocalNameIndex() Get the next index to apply to an [local name] of an Element or Attribute Information Item. This will increment the next obtained index such that: i = w.getNextLocalNameIndex(); j = w.getNextLocalNameIndex(); i == j + 1;
| |
| initiateLowLevelWriting | back to summary |
|---|---|
| public void initiateLowLevelWriting() throws XMLStreamException Initiate low level writing of an element fragment. This method must be invoked before other low level method. | |
| writeLowLevelAttribute | back to summary |
|---|---|
| public boolean writeLowLevelAttribute(String prefix, String namespaceURI, String localName) throws IOException Write an attribute.
| |
| writeLowLevelAttributeIndexed | back to summary |
|---|---|
| public void writeLowLevelAttributeIndexed(int index) throws IOException | |
| writeLowLevelAttributeValue | back to summary |
|---|---|
| public void writeLowLevelAttributeValue(String value) throws IOException | |
| writeLowLevelEndElement | back to summary |
|---|---|
| public void writeLowLevelEndElement() throws IOException | |
| writeLowLevelEndNamespaces | back to summary |
|---|---|
| public void writeLowLevelEndNamespaces() throws IOException | |
| writeLowLevelEndStartElement | back to summary |
|---|---|
| public void writeLowLevelEndStartElement() throws IOException | |
| writeLowLevelNamespace | back to summary |
|---|---|
| public void writeLowLevelNamespace(String prefix, String namespaceName) throws IOException | |
| writeLowLevelOctets | back to summary |
|---|---|
| public void writeLowLevelOctets(byte[] octets, int length) throws IOException | |
| writeLowLevelStartAttributes | back to summary |
|---|---|
| public void writeLowLevelStartAttributes() throws IOException | |
| writeLowLevelStartElement | back to summary |
|---|---|
| public boolean writeLowLevelStartElement(int type, String prefix, String localName, String namespaceURI) throws IOException Write the start of an element.
| |
| writeLowLevelStartElementIndexed | back to summary |
|---|---|
| public void writeLowLevelStartElementIndexed(int type, int index) throws IOException | |
| writeLowLevelStartNameLiteral | back to summary |
|---|---|
| public void writeLowLevelStartNameLiteral(int type, String prefix, byte[] utf8LocalName, String namespaceURI) throws IOException | |
| writeLowLevelStartNameLiteral | back to summary |
|---|---|
| public void writeLowLevelStartNameLiteral(int type, String prefix, int localNameIndex, String namespaceURI) throws IOException | |
| writeLowLevelStartNamespaces | back to summary |
|---|---|
| public void writeLowLevelStartNamespaces() throws IOException | |
| writeLowLevelTerminationAndMark | back to summary |
|---|---|
| public void writeLowLevelTerminationAndMark() throws IOException | |
| writeLowLevelText | back to summary |
|---|---|
| public void writeLowLevelText(char[] text, int length) throws IOException | |
| writeLowLevelText | back to summary |
|---|---|
| public void writeLowLevelText(String text) throws IOException | |