Class 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 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 interface org.exbin.xbup.core.ubnumber.UBStreamable
        Overrides:
        toStreamUB in class XBTree
        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 interface org.exbin.xbup.core.ubnumber.UBStreamable
        Overrides:
        fromStreamUB in class XBTree
        Throws:
        java.io.IOException
        org.exbin.xbup.core.parser.XBProcessingException
      • getSizeUB

        public int getSizeUB()
        Specified by:
        getSizeUB in interface org.exbin.xbup.core.ubnumber.UBStreamable
        Overrides:
        getSizeUB in class XBTree
      • getTailData

        @Nonnull
        public java.util.Optional<java.io.InputStream> getTailData()
        Specified by:
        getTailData in interface org.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 interface org.exbin.xbup.core.block.XBEditableDocument
        Throws:
        java.io.IOException
      • getTailDataSize

        public long getTailDataSize()
        Specified by:
        getTailDataSize in interface org.exbin.xbup.core.block.XBDocument
      • clear

        public void clear()
        Specified by:
        clear in interface org.exbin.xbup.core.block.XBEditableDocument
        Overrides:
        clear in class XBTree
      • getRootBlock

        public java.util.Optional<org.exbin.xbup.core.block.XBBlock> getRootBlock()
        Specified by:
        getRootBlock in interface org.exbin.xbup.core.block.XBDocument
      • setRootBlock

        public void setRootBlock​(@Nullable
                                 org.exbin.xbup.core.block.XBBlock block)
        Specified by:
        setRootBlock in interface org.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 interface org.exbin.xbup.core.block.XBDocument