Interface ContentProducer

  • All Known Subinterfaces:
    Storage
    All Known Implementing Classes:
    NodeContentProducer

    public interface ContentProducer
    Provides access to a content. Developers are advised to subclass the AbstractStructureProvider base implementation.

    Clients may implement this interface.

    • Method Detail

      • getContents

        InputStream getContents​(Map<?,​?> options)
                         throws IOException,
                                UnsupportedOperationException
        Returns the underlying content as a stream.

        The options configures the content to retrieve. Options can typically contain a "Content-Type" property to request data in a specific format.

        Parameters:
        options - properties describing the content to retrieve.
        Returns:
        the underlying content as a stream.
        Throws:
        IOException - if the content cannot be read.
        UnsupportedOperationException - if the content cannot be read for the specified options. This can typically happen if a specific Content-Type is requested and the producer does not support such format.