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 voidclear()org.exbin.xbup.core.block.XBTBlockcreateNewBlock(org.exbin.xbup.core.block.XBTBlock parent)java.util.Optional<org.exbin.xbup.core.block.XBTBlock>findBlockByIndex(long index)intfromFileUB()intfromStreamUB(java.io.InputStream stream)longgetDocumentSize()java.lang.StringgetFileName()java.util.Optional<org.exbin.xbup.core.block.XBTBlock>getRootBlock()intgetSizeUB()java.util.Optional<java.io.InputStream>getTailData()org.exbin.auxiliary.paged_data.BinaryDatagetTailDataArray()longgetTailDataSize()voidprocessSpec()voidsetFileName(java.lang.String fileName)voidsetModified(boolean modified)voidsetRootBlock(org.exbin.xbup.core.block.XBTBlock block)voidsetTailData(java.io.InputStream source)inttoFileUB()inttoStreamUB(java.io.OutputStream stream)booleanwasModified()-
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:
toStreamUBin interfaceorg.exbin.xbup.core.ubnumber.UBStreamable- Overrides:
toStreamUBin 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:
fromStreamUBin interfaceorg.exbin.xbup.core.ubnumber.UBStreamable- Overrides:
fromStreamUBin classXBTTree- Throws:
java.io.IOExceptionorg.exbin.xbup.core.parser.XBProcessingException
-
getSizeUB
public int getSizeUB()
-
getTailData
@Nonnull public java.util.Optional<java.io.InputStream> getTailData()
- Specified by:
getTailDatain 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:
setTailDatain interfaceorg.exbin.xbup.core.block.XBTEditableDocument- Throws:
java.io.IOException
-
getTailDataSize
public long getTailDataSize()
- Specified by:
getTailDataSizein 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:
getRootBlockin interfaceorg.exbin.xbup.core.block.XBTDocument- Overrides:
getRootBlockin classXBTTree
-
setRootBlock
public void setRootBlock(@Nullable org.exbin.xbup.core.block.XBTBlock block)- Specified by:
setRootBlockin 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.IOExceptionorg.exbin.xbup.core.parser.XBProcessingException
-
toFileUB
public int toFileUB() throws java.io.IOException- Throws:
java.io.IOException
-
processSpec
public void processSpec()
- Overrides:
processSpecin classXBTTree
-
findBlockByIndex
@Nonnull public java.util.Optional<org.exbin.xbup.core.block.XBTBlock> findBlockByIndex(long index)
- Specified by:
findBlockByIndexin 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:
createNewBlockin interfaceorg.exbin.xbup.core.block.XBTEditableDocument
-
getDocumentSize
public long getDocumentSize()
- Specified by:
getDocumentSizein interfaceorg.exbin.xbup.core.block.XBTDocument
-
-