public class XBTTreeDocument extends XBTTree implements XBTEditableDocument
rootContext| Constructor and Description |
|---|
XBTTreeDocument()
Creates a new instance of XBTreeDocument
|
XBTTreeDocument(XBCatalog catalog) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all data in this document
|
XBTBlock |
createNewBlock(XBTBlock parent)
Create new instance of block as next child for given block.
|
XBTBlock |
findNodeByIndex(long index)
Find node using depth-first traversal index.
|
int |
fromFileUB() |
int |
fromStreamUB(java.io.InputStream stream)
Method for reading values in UB Encoding from standard data stream.
|
long |
getDocumentSize()
Get size of the whole document.
|
java.io.InputStream |
getExtended()
Get extended data area.
|
byte[] |
getExtendedArray() |
long |
getExtendedSize()
Get size of extended data area.
|
java.lang.String |
getFileName() |
void |
processSpec() |
void |
setExtended(java.io.InputStream source)
Set extended data area.
|
void |
setFileName(java.lang.String fileName) |
void |
setModified(boolean modified) |
void |
setRootBlock(XBTBlock block)
Set root block of the document.
|
int |
sizeUB()
Method for reading size of data which would be saved in data stream.
|
int |
toFileUB() |
int |
toStreamUB(java.io.OutputStream stream)
Method for writting values in UB Encoding to standard data stream.
|
boolean |
wasModified() |
getCatalog, getRootBlock, getRootContext, newNodeInstance, setCatalog, setRootBlock, setRootContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRootBlockpublic XBTTreeDocument()
public XBTTreeDocument(XBCatalog catalog)
public int toStreamUB(java.io.OutputStream stream)
throws java.io.IOException
UBStreamabletoStreamUB in interface UBStreamabletoStreamUB in class XBTTreestream - Stream to writejava.io.IOExceptionpublic int fromStreamUB(java.io.InputStream stream)
throws java.io.IOException,
XBProcessingException
UBStreamablefromStreamUB in interface UBStreamablefromStreamUB in class XBTTreestream - Stream to readjava.io.IOExceptionXBProcessingExceptionpublic int sizeUB()
UBStreamablesizeUB in interface UBStreamablesizeUB in class XBTTreepublic java.io.InputStream getExtended()
XBTDocumentgetExtended in interface XBTDocumentpublic byte[] getExtendedArray()
public void setExtended(java.io.InputStream source)
XBTEditableDocumentsetExtended in interface XBTEditableDocumentsource - InputStream to use as data source for this document.public long getExtendedSize()
XBTDocumentgetExtendedSize in interface XBTDocumentpublic void clear()
XBTEditableDocumentclear in interface XBTEditableDocumentclear in class XBTTreepublic void setRootBlock(XBTBlock block) throws XBProcessingException
XBTEditableDocumentsetRootBlock in interface XBTEditableDocumentblock - the block to use as root block for this document.XBProcessingExceptionpublic boolean wasModified()
public void setModified(boolean modified)
public java.lang.String getFileName()
public void setFileName(java.lang.String fileName)
public int fromFileUB()
throws java.io.IOException,
XBProcessingException
java.io.IOExceptionXBProcessingExceptionpublic int toFileUB()
throws java.io.IOException
java.io.IOExceptionpublic void processSpec()
processSpec in class XBTTreepublic XBTBlock findNodeByIndex(long index)
XBTEditableDocumentfindNodeByIndex in interface XBTEditableDocumentfindNodeByIndex in class XBTTreeindex - order of the block in document.public XBTBlock createNewBlock(XBTBlock parent)
XBTEditableDocumentcreateNewBlock in interface XBTEditableDocumentparent - block which would be set as parent block. Null for root node.public long getDocumentSize()
XBTDocumentgetDocumentSize in interface XBTDocument