Interface DocumentCollection

    • Field Detail

      • DEFAULT_EXTENSION

        static final String DEFAULT_EXTENSION
        The default extension for a serialised collection (including the dot).
        See Also:
        Constant Field Values
    • Method Detail

      • size

        long size()
        Returns the number of documents in this collection.
        Returns:
        the number of documents in this collection.
      • document

        Document document​(long index)
                   throws IOException
        Returns the document given its index.
        Parameters:
        index - an index between 0 (inclusive) and size() (exclusive).
        Returns:
        the index-th document.
        Throws:
        IOException
      • stream

        InputStream stream​(long index)
                    throws IOException
        Returns an input stream for the raw content of a document.
        Parameters:
        index - an index between 0 (inclusive) and size() (exclusive).
        Returns:
        the raw content of the document as an input stream.
        Throws:
        IOException