Package org.exbin.xbup.parser_tree
Class XBTTreeDocument
- java.lang.Object
-
- org.exbin.xbup.parser_tree.XBTTree
-
- org.exbin.xbup.parser_tree.XBTTreeDocument
-
- All Implemented Interfaces:
java.io.Serializable
,org.exbin.xbup.core.block.XBTDocument
,org.exbin.xbup.core.block.XBTEditableDocument
,org.exbin.xbup.core.ubnumber.UBStreamable
@ParametersAreNonnullByDefault public class XBTTreeDocument extends XBTTree implements org.exbin.xbup.core.block.XBTEditableDocument
Basic object model parser XBUP level 1 document representation.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.exbin.xbup.parser_tree.XBTTree
rootContext
-
-
Constructor Summary
Constructors Constructor Description XBTTreeDocument()
XBTTreeDocument(org.exbin.xbup.core.catalog.XBCatalog catalog)
XBTTreeDocument(XBTTreeNode rootNode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
org.exbin.xbup.core.block.XBTBlock
createNewBlock(org.exbin.xbup.core.block.XBTBlock parent)
java.util.Optional<org.exbin.xbup.core.block.XBTBlock>
findBlockByIndex(long index)
int
fromFileUB()
int
fromStreamUB(java.io.InputStream stream)
long
getDocumentSize()
java.lang.String
getFileName()
java.util.Optional<org.exbin.xbup.core.block.XBTBlock>
getRootBlock()
int
getSizeUB()
java.util.Optional<java.io.InputStream>
getTailData()
org.exbin.auxiliary.paged_data.BinaryData
getTailDataArray()
long
getTailDataSize()
void
processSpec()
void
setFileName(java.lang.String fileName)
void
setModified(boolean modified)
void
setRootBlock(org.exbin.xbup.core.block.XBTBlock block)
void
setTailData(java.io.InputStream source)
int
toFileUB()
int
toStreamUB(java.io.OutputStream stream)
boolean
wasModified()
-
Methods inherited from class org.exbin.xbup.parser_tree.XBTTree
findNodeByIndex, getCatalog, getRoot, getRootContext, newNodeInstance, setCatalog, setRoot, setRootContext
-
-
-
-
Constructor Detail
-
XBTTreeDocument
public XBTTreeDocument()
-
XBTTreeDocument
public XBTTreeDocument(@Nullable XBTTreeNode rootNode)
-
XBTTreeDocument
public XBTTreeDocument(@Nullable org.exbin.xbup.core.catalog.XBCatalog catalog)
-
-
Method Detail
-
toStreamUB
public int toStreamUB(java.io.OutputStream stream) throws java.io.IOException
- Specified by:
toStreamUB
in interfaceorg.exbin.xbup.core.ubnumber.UBStreamable
- Overrides:
toStreamUB
in classXBTTree
- Throws:
java.io.IOException
-
fromStreamUB
public int fromStreamUB(java.io.InputStream stream) throws java.io.IOException, org.exbin.xbup.core.parser.XBProcessingException
- Specified by:
fromStreamUB
in interfaceorg.exbin.xbup.core.ubnumber.UBStreamable
- Overrides:
fromStreamUB
in classXBTTree
- Throws:
java.io.IOException
org.exbin.xbup.core.parser.XBProcessingException
-
getSizeUB
public int getSizeUB()
-
getTailData
@Nonnull public java.util.Optional<java.io.InputStream> getTailData()
- Specified by:
getTailData
in interfaceorg.exbin.xbup.core.block.XBTDocument
-
getTailDataArray
@Nullable public org.exbin.auxiliary.paged_data.BinaryData getTailDataArray()
-
setTailData
public void setTailData(@Nullable java.io.InputStream source) throws java.io.IOException
- Specified by:
setTailData
in interfaceorg.exbin.xbup.core.block.XBTEditableDocument
- Throws:
java.io.IOException
-
getTailDataSize
public long getTailDataSize()
- Specified by:
getTailDataSize
in interfaceorg.exbin.xbup.core.block.XBTDocument
-
clear
public void clear()
-
getRootBlock
@Nonnull public java.util.Optional<org.exbin.xbup.core.block.XBTBlock> getRootBlock()
- Specified by:
getRootBlock
in interfaceorg.exbin.xbup.core.block.XBTDocument
- Overrides:
getRootBlock
in classXBTTree
-
setRootBlock
public void setRootBlock(@Nullable org.exbin.xbup.core.block.XBTBlock block)
- Specified by:
setRootBlock
in interfaceorg.exbin.xbup.core.block.XBTEditableDocument
-
wasModified
public boolean wasModified()
-
setModified
public void setModified(boolean modified)
-
getFileName
@Nullable public java.lang.String getFileName()
-
setFileName
public void setFileName(@Nullable java.lang.String fileName)
-
fromFileUB
public int fromFileUB() throws java.io.IOException, org.exbin.xbup.core.parser.XBProcessingException
- Throws:
java.io.IOException
org.exbin.xbup.core.parser.XBProcessingException
-
toFileUB
public int toFileUB() throws java.io.IOException
- Throws:
java.io.IOException
-
processSpec
public void processSpec()
- Overrides:
processSpec
in classXBTTree
-
findBlockByIndex
@Nonnull public java.util.Optional<org.exbin.xbup.core.block.XBTBlock> findBlockByIndex(long index)
- Specified by:
findBlockByIndex
in interfaceorg.exbin.xbup.core.block.XBTEditableDocument
-
createNewBlock
@Nonnull public org.exbin.xbup.core.block.XBTBlock createNewBlock(@Nullable org.exbin.xbup.core.block.XBTBlock parent)
- Specified by:
createNewBlock
in interfaceorg.exbin.xbup.core.block.XBTEditableDocument
-
getDocumentSize
public long getDocumentSize()
- Specified by:
getDocumentSize
in interfaceorg.exbin.xbup.core.block.XBTDocument
-
-