Class XBDefaultDocument

  • All Implemented Interfaces:
    XBDocument

    @ParametersAreNonnullByDefault
    public class XBDefaultDocument
    extends java.lang.Object
    implements XBDocument
    Basic plain implementation of XBDocument interface.
    • Constructor Detail

      • XBDefaultDocument

        public XBDefaultDocument​(XBBlock rootBlock)
      • XBDefaultDocument

        public XBDefaultDocument​(XBBlock rootBlock,
                                 @Nullable
                                 org.exbin.auxiliary.paged_data.BinaryData tailData)
      • XBDefaultDocument

        public XBDefaultDocument​(XBBlock rootBlock,
                                 java.io.InputStream tailDataStream)
                          throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getRootBlock

        @Nonnull
        public java.util.Optional<XBBlock> getRootBlock()
        Description copied from interface: XBDocument
        Returns root block of the document.
        Specified by:
        getRootBlock in interface XBDocument
        Returns:
        root block if exits or null.
      • getTailData

        @Nonnull
        public java.util.Optional<java.io.InputStream> getTailData()
        Description copied from interface: XBDocument
        Returns tail data input stream.
        Specified by:
        getTailData in interface XBDocument
        Returns:
        InputStream of providing read access to data area
      • getTailDataSize

        public long getTailDataSize()
        Description copied from interface: XBDocument
        Returns size of the tail data if available.
        Specified by:
        getTailDataSize in interface XBDocument
        Returns:
        length of tail data in bytes or -1 if not available or is infinite
      • getDocumentSize

        public long getDocumentSize()
        Description copied from interface: XBDocument
        Returns size of the whole document if available.
        Specified by:
        getDocumentSize in interface XBDocument
        Returns:
        length of whole document in bytes or -1 if not available or is infinite