|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A factory for creating node ids. To support different numbering
schemes, NodeId instances should always be created through
this interface.
The NodeIdFactory for the current database instance can be
retrieved from BrokerPool.getNodeFactory()
.
Method Summary | |
NodeId |
createFromData(int sizeHint,
byte[] data,
int startOffset)
Read a NodeId from the given byte array. |
NodeId |
createFromStream(VariableByteInput is)
Read a NodeId from the given input stream. |
NodeId |
createFromString(java.lang.String string)
Create a NodeId instance from its string representation. |
NodeId |
createInstance()
Create a new NodeId, initialized with a default value. |
NodeId |
createInstance(int id)
Create a new NodeId, initialized with the given base id. |
NodeId |
documentNodeId()
Returns a NodeId representing the document node of a document. |
int |
lengthInBytes(int units,
byte[] data,
int startOffset)
Returns the number of bytes occupied by the NodeId stored in the byte array at the given startOffset. |
void |
writeEndOfDocument(VariableByteOutputStream os)
|
Method Detail |
public NodeId createInstance()
public NodeId createInstance(int id)
id
-
public NodeId createFromStream(VariableByteInput is) throws java.io.IOException
is
- the input stream to read from
java.io.IOException
public NodeId createFromData(int sizeHint, byte[] data, int startOffset)
sizeHint
- a hint about the expected length of the iddata
- the byte array to read fromstartOffset
- offset into the byte array
public NodeId createFromString(java.lang.String string)
string
- the string representation of the node id as returned
by Object.toString()
public int lengthInBytes(int units, byte[] data, int startOffset)
createFromData(int, byte[], int)
, but it
just returns the number of bytes.
units
- data
- startOffset
-
public NodeId documentNodeId()
public void writeEndOfDocument(VariableByteOutputStream os)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |