public abstract class XmlNodeChunk extends Chunk
Chunk.TypechunkSize, headerSize, METADATA_SIZE, offset, PAD_BOUNDARY| Modifier | Constructor and Description |
|---|---|
protected |
XmlNodeChunk(java.nio.ByteBuffer buffer,
Chunk parent) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getComment()
Returns the comment associated with this node, if any.
|
int |
getLineNumber()
Returns the line number in the original source at which this node appeared.
|
protected java.lang.String |
getString(int index)
An
XmlNodeChunk does not know by itself what strings its indices reference. |
boolean |
hasComment()
Returns true if this XML node contains a comment.
|
java.lang.String |
toString()
Returns a brief description of this XML node.
|
protected void |
writeHeader(java.nio.ByteBuffer output)
An
XmlNodeChunk and anything that is itself an XmlNodeChunk has a header size
of 16. |
getHeaderSize, getOriginalChunkSize, getParent, getType, init, newInstance, newInstance, toByteArray, toByteArray, writeHeader, writePad, writePayloadprotected XmlNodeChunk(java.nio.ByteBuffer buffer,
@Nullable
Chunk parent)
public boolean hasComment()
public int getLineNumber()
public java.lang.String getComment()
protected java.lang.String getString(int index)
XmlNodeChunk does not know by itself what strings its indices reference. In order
to get the actual string, the first XmlChunk ancestor is found. The
XmlChunk ancestor should have a string pool which index references.index - The index of the string.index references, or empty string if index is -1.protected final void writeHeader(java.nio.ByteBuffer output)
XmlNodeChunk and anything that is itself an XmlNodeChunk has a header size
of 16. Anything else is, interestingly, considered to be a payload. For that reason, this
method is final.writeHeader in class Chunkoutput - The buffer that the header will be written to.public java.lang.String toString()
"XmlNodeChunk{line=1234, comment=My awesome comment.}"toString in class java.lang.Object