Package org.exbin.xbup.parser_tree
Class XBTreeDocument
- java.lang.Object
-
- org.exbin.xbup.parser_tree.XBTree
-
- org.exbin.xbup.parser_tree.XBTreeDocument
-
- All Implemented Interfaces:
java.io.Serializable,org.exbin.xbup.core.block.XBDocument,org.exbin.xbup.core.block.XBEditableDocument,org.exbin.xbup.core.ubnumber.UBStreamable
public class XBTreeDocument extends XBTree implements org.exbin.xbup.core.block.XBEditableDocument, org.exbin.xbup.core.ubnumber.UBStreamable
Basic object model parser XBUP level 0 document representation.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XBTreeDocument()XBTreeDocument(XBTreeNode rootNode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()intfromFileUB()intfromStreamUB(java.io.InputStream stream)longgetDocumentSize()java.lang.StringgetFileName()java.util.Optional<org.exbin.xbup.core.block.XBBlock>getRootBlock()intgetSizeUB()java.util.Optional<java.io.InputStream>getTailData()org.exbin.auxiliary.paged_data.BinaryDatagetTailDataArray()longgetTailDataSize()voidsetFileName(java.lang.String fileName)voidsetModified(boolean modified)voidsetRootBlock(org.exbin.xbup.core.block.XBBlock block)voidsetTailData(java.io.InputStream source)inttoFileUB()inttoStreamUB(java.io.OutputStream stream)booleanwasModified()-
Methods inherited from class org.exbin.xbup.parser_tree.XBTree
findBlockByIndex, getRoot, newNodeInstance, setRootBlock
-
-
-
-
Constructor Detail
-
XBTreeDocument
public XBTreeDocument()
-
XBTreeDocument
public XBTreeDocument(@Nullable XBTreeNode rootNode)
-
-
Method Detail
-
toStreamUB
public int toStreamUB(@Nonnull java.io.OutputStream stream) throws java.io.IOException- Specified by:
toStreamUBin interfaceorg.exbin.xbup.core.ubnumber.UBStreamable- Overrides:
toStreamUBin classXBTree- Throws:
java.io.IOException
-
fromStreamUB
public int fromStreamUB(@Nonnull 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 classXBTree- 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.XBDocument
-
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.XBEditableDocument- Throws:
java.io.IOException
-
getTailDataSize
public long getTailDataSize()
- Specified by:
getTailDataSizein interfaceorg.exbin.xbup.core.block.XBDocument
-
clear
public void clear()
-
getRootBlock
public java.util.Optional<org.exbin.xbup.core.block.XBBlock> getRootBlock()
- Specified by:
getRootBlockin interfaceorg.exbin.xbup.core.block.XBDocument
-
setRootBlock
public void setRootBlock(@Nullable org.exbin.xbup.core.block.XBBlock block)- Specified by:
setRootBlockin interfaceorg.exbin.xbup.core.block.XBEditableDocument
-
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
-
getDocumentSize
public long getDocumentSize()
- Specified by:
getDocumentSizein interfaceorg.exbin.xbup.core.block.XBDocument
-
-