com.groupdocs.parser

Interfaces

Classes

Exceptions

com.groupdocs.parser

Class Container.Entity

  • Enclosing class:
    Container


    public static final class Container.Entity
    extends Object

    Provides the information of the container's entity.

    • Constructor Detail

      • Container.Entity

        public Container.Entity(IContainer owner,
                        String name)

        Initializes a new instance of the Entity class.

        Parameters:
        owner - A reference to the instance of the container.
        name - The name of the entity.
        Throws:
        ArgumentNullException - owner is null.
      • Container.Entity

        public Container.Entity(IContainer owner,
                        String name,
                        ContainerPath path)

        Initializes a new instance of the Entity class.

        Parameters:
        owner - A reference to the instance of the container.
        name - The name of the entity.
        path - The path of the entity.
        Throws:
        ArgumentNullException - owner is null.
      • Container.Entity

        public Container.Entity(IContainer owner,
                        String name,
                        ContainerPath path,
                        String mediaType,
                        Container.EntityParameter... parameters)

        Initializes a new instance of the Entity class.

        Parameters:
        owner - A reference to the instance of the container.
        name - The name of the entity.
        path - The path of the entity.
        mediaType - The media type of the file.
        parameters - The collection of the additional file's parameters.
        Throws:
        ArgumentNullException - owner is null.
      • Container.Entity

        public Container.Entity(IContainer owner,
                        String name,
                        ContainerPath path,
                        String mediaType,
                        Date date,
                        long size,
                        Container.EntityParameter... parameters)

        Initializes a new instance of the Entity class.

        Parameters:
        owner - A reference to the instance of the container.
        name - The name of the entity.
        path - The path of the entity.
        mediaType - The media type of the file.
        date - The entity time.
        size - The entity size (in bytes).
        parameters - The collection of the additional file's parameters.
        Throws:
        ArgumentNullException - owner is null.
    • Method Detail

      • getName

        public String getName()

        Gets a name of the entity.

        Returns:
        A string that represents the name of the entity.
      • getPath

        public ContainerPath getPath()

        Gets a path of the entity.

        Returns:
        A string that represents the path of the entity.
      • getMediaType

        public String getMediaType()

        Gets a media type for the document.

        Returns:
        A media type for the document or null if a media type isn't set..
      • getDate

        public Date getDate()

        Gets a date for the entity.

        Returns:
        A date for the entity or null if a date isn't set.
      • getSize

        public long getSize()

        Gets a size (in bytes) of the entity.

        Returns:
        A size of the entity or 0 if a size isn't set.
      • getKeys

        public List<String> getKeys()

        Gets a collection containing the keys in the Container.

        Returns:
        A collection containing the keys in the Container.
      • get_Item

        public String get_Item(String parameterName)

        Gets or sets the value associated with the specified key.

        Parameters:
        parameterName - The key of the value to get or set.
        Returns:
        The value associated with the specified key. If the specified key is not found, a get operation returns null. A set operation creates a new element with the specified key.
      • openStream

        public InputStream openStream()

        Returns the stream with the content of the entity.

        Returns:
        An instance of the java.io.InputStream with the content of the entity.