|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NodeIdFactory
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(NodeId previous,
VariableByteInput is)
Read a NodeId from the given input stream. |
NodeId |
createFromStream(VariableByteInput is)
Read a NodeId from the given input stream. |
NodeId |
createFromString(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 |
---|
NodeId createInstance()
NodeId createInstance(int id)
id
-
NodeId createFromStream(VariableByteInput is) throws IOException
is
- the input stream to read from
IOException
- if there's a problem with the underlying input streamNodeId.write(org.exist.storage.io.VariableByteOutputStream)
NodeId createFromStream(NodeId previous, VariableByteInput is) throws IOException
previous
- the previous node id read or null if there is noneis
- the input stream to read from
IOException
- if there's a problem with the underlying input streamNodeId.write(NodeId, org.exist.storage.io.VariableByteOutputStream)
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
NodeId createFromString(String string)
string
- the string representation of the node id as returned
by Object.toString()
int lengthInBytes(int units, byte[] data, int startOffset)
createFromData(int, byte[], int)
, but it
just returns the number of bytes.
units
- data
- startOffset
-
NodeId documentNodeId()
void writeEndOfDocument(VariableByteOutputStream os)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |