|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectorg.exist.numbering.DLNFactory
public class 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(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)
|
| 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 NodeIdFactorypublic NodeId createInstance(int id)
NodeIdFactory
createInstance in interface NodeIdFactory
public NodeId createFromStream(VariableByteInput is)
throws IOException
NodeIdFactory
createFromStream in interface NodeIdFactoryis - the input stream to read from
IOException - if there's a problem with the underlying input streamNodeId.write(org.exist.storage.io.VariableByteOutputStream)
public NodeId createFromStream(NodeId previous,
VariableByteInput is)
throws IOException
NodeIdFactory
createFromStream in interface NodeIdFactoryprevious - 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)
public NodeId createFromData(int sizeHint,
byte[] data,
int startOffset)
NodeIdFactory
createFromData in interface NodeIdFactorysizeHint - a hint about the expected length of the iddata - the byte array to read fromstartOffset - offset into the byte array
public NodeId createFromString(String string)
NodeIdFactory
createFromString in interface NodeIdFactorystring - 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)
NodeIdFactoryNodeIdFactory.createFromData(int, byte[], int), but it
just returns the number of bytes.
lengthInBytes in interface NodeIdFactorypublic void writeEndOfDocument(VariableByteOutputStream os)
writeEndOfDocument in interface NodeIdFactory
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||