|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.numbering.DLNFactory
Implementation of NodeIdFactory
for DLN-based
node ids.
Constructor Summary | |
DLNFactory()
|
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)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DLNFactory()
Method Detail |
public NodeId createInstance()
NodeIdFactory
createInstance
in interface NodeIdFactory
public NodeId createInstance(int id)
NodeIdFactory
createInstance
in interface NodeIdFactory
id
-
public NodeId createFromStream(VariableByteInput is) throws java.io.IOException
NodeIdFactory
createFromStream
in interface NodeIdFactory
is
- the input stream to read from
java.io.IOException
public NodeId createFromData(int sizeHint, byte[] data, int startOffset)
NodeIdFactory
createFromData
in interface NodeIdFactory
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)
NodeIdFactory
createFromString
in interface NodeIdFactory
string
- the string representation of the node id as returned
by Object.toString()
public NodeId documentNodeId()
NodeIdFactory
documentNodeId
in interface NodeIdFactory
public int lengthInBytes(int units, byte[] data, int startOffset)
NodeIdFactory
NodeIdFactory.createFromData(int, byte[], int)
, but it
just returns the number of bytes.
lengthInBytes
in interface NodeIdFactory
units
- data
- startOffset
-
public void writeEndOfDocument(VariableByteOutputStream os)
writeEndOfDocument
in interface NodeIdFactory
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |