com.groupdocs.parser

Interfaces

Classes

Exceptions

com.groupdocs.parser

Class Container

    • Constructor Detail

      • Container

        public Container(InputStream containerStream)

        Initializes a new instance of the Container class.

        Parameters:
        containerStream - A stream of the container.
        Throws:
        ArgumentNullException - containerStream is null.
      • Container

        protected Container()

        Initializes a new instance of the Container class.

    • Method Detail

      • getMediaType

        public String getMediaType()

        Gets a media type for the container.

        Returns:
        A media type for the document. The default is null.
      • setMediaType

        public void setMediaType(String value)

        Sets a media type for the container.

        Parameters:
        value - A media type for the document. The default is null.
      • getEncoding

        public Charset getEncoding()

        Gets an encoding for the container.

        Returns:
        An encoding for the container. The default is null.
      • setEncoding

        public void setEncoding(Charset value)

        Sets an encoding for the container.

        Parameters:
        value - An encoding for the container. The default is null.
      • getEntities

        public List<Container.Entity> getEntities()

        Gets a collection of the container's entities.

        Specified by:
        getEntities in interface IContainer
        Returns:
        A collection of the container's entities.
      • getContainerStream

        protected InputStream getContainerStream()

        Gets a stream of the container.

        Returns:
        A stream of the container.
      • dispose

        public void dispose()

        Releases the unmanaged resources used by the container.

      • openEntityStream

        public InputStream openEntityStream(Container.Entity entity)

        Opens a stream with the content of the container's entity.

        Specified by:
        openEntityStream in interface IContainer
        Parameters:
        entity - A container's entity.
        Returns:
        A stream with the content of the container's entity.
      • load

        protected void load()

        Loads a collection of the container's entities.

      • dispose

        protected void dispose(boolean disposing)

        Releases the unmanaged resources used by the container.

        Parameters:
        disposing - A boolean true if invoked from Dispose; otherwise, false.
      • openStream

        protected abstract InputStream openStream(Container.Entity entity)

        Returns the stream with the content of the entity.

        Parameters:
        entity - The entity.
        Returns:
        An instance of the java.io.InputStream with the content of the entity.
      • loadEntities

        protected abstract List<Container.Entity> loadEntities()

        Returns a collection of the container's entities.

        Returns:
        A collection of the container's entities.