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 void
clear()
int
fromFileUB()
int
fromStreamUB(java.io.InputStream stream)
long
getDocumentSize()
java.lang.String
getFileName()
java.util.Optional<org.exbin.xbup.core.block.XBBlock>
getRootBlock()
int
getSizeUB()
java.util.Optional<java.io.InputStream>
getTailData()
org.exbin.auxiliary.paged_data.BinaryData
getTailDataArray()
long
getTailDataSize()
void
setFileName(java.lang.String fileName)
void
setModified(boolean modified)
void
setRootBlock(org.exbin.xbup.core.block.XBBlock 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.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:
toStreamUB
in interfaceorg.exbin.xbup.core.ubnumber.UBStreamable
- Overrides:
toStreamUB
in 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:
fromStreamUB
in interfaceorg.exbin.xbup.core.ubnumber.UBStreamable
- Overrides:
fromStreamUB
in classXBTree
- 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.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:
setTailData
in interfaceorg.exbin.xbup.core.block.XBEditableDocument
- Throws:
java.io.IOException
-
getTailDataSize
public long getTailDataSize()
- Specified by:
getTailDataSize
in interfaceorg.exbin.xbup.core.block.XBDocument
-
clear
public void clear()
-
getRootBlock
public java.util.Optional<org.exbin.xbup.core.block.XBBlock> getRootBlock()
- Specified by:
getRootBlock
in interfaceorg.exbin.xbup.core.block.XBDocument
-
setRootBlock
public void setRootBlock(@Nullable org.exbin.xbup.core.block.XBBlock block)
- Specified by:
setRootBlock
in 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.IOException
org.exbin.xbup.core.parser.XBProcessingException
-
toFileUB
public int toFileUB() throws java.io.IOException
- Throws:
java.io.IOException
-
getDocumentSize
public long getDocumentSize()
- Specified by:
getDocumentSize
in interfaceorg.exbin.xbup.core.block.XBDocument
-
-