Interface BytesDocument

    • Method Detail

      • contentAsInputStream

        InputStream contentAsInputStream()
        Gets the contents of the document as an input stream.

        This is probably cheaper than getting a copy of the bytes and wrapping that in your own input stream.

        Returns:
        the contents of the document as an input stream.
      • cloneWithURI

        BytesDocument cloneWithURI​(URI uri)
        Gets a clone of the document with a different URI.
        Specified by:
        cloneWithURI in interface FilterableDocument
        Parameters:
        uri - the document returned document will have.
        Returns:
        A new document with the given URI.
      • cloneWithMetadata

        BytesDocument cloneWithMetadata​(com.google.common.collect.ListMultimap<String,​String> metadata)
        Gets a clone of the document with the given metadata.

        Note that the returned document will only have the metadata given as a paramater to this method. Typically the result of NoContentDocument.getCopyOfMetadata() should be manipulated then passed to this function to preserve existing metadata.

        Specified by:
        cloneWithMetadata in interface FilterableDocument
        Parameters:
        metadata - The only metadata that the returbed document will have.
        Returns:
        A new document with the given headers.