Class FileObjectContentItem

  • All Implemented Interfaces:
    Serializable, org.pentaho.reporting.libraries.repository.ContentEntity, org.pentaho.reporting.libraries.repository.ContentItem

    public class FileObjectContentItem
    extends FileObjectContentEntity
    implements org.pentaho.reporting.libraries.repository.ContentItem
    A content item wrapping a file.
    Author:
    Thomas Morgner, Alexander Buloichik
    See Also:
    Serialized Form
    • Constructor Detail

      • FileObjectContentItem

        public FileObjectContentItem​(org.pentaho.reporting.libraries.repository.ContentLocation parent,
                                     org.apache.commons.vfs2.FileObject backend)
        Creates a new file based content item for the given file and parent location.
        Parameters:
        parent - the parent.
        backend - the backend.
    • Method Detail

      • getMimeType

        public String getMimeType()
                           throws org.pentaho.reporting.libraries.repository.ContentIOException
        Specified by:
        getMimeType in interface org.pentaho.reporting.libraries.repository.ContentItem
        Throws:
        org.pentaho.reporting.libraries.repository.ContentIOException
      • getOutputStream

        public OutputStream getOutputStream()
                                     throws org.pentaho.reporting.libraries.repository.ContentIOException,
                                            IOException
        Specified by:
        getOutputStream in interface org.pentaho.reporting.libraries.repository.ContentItem
        Throws:
        org.pentaho.reporting.libraries.repository.ContentIOException
        IOException
      • getInputStream

        public InputStream getInputStream()
                                   throws org.pentaho.reporting.libraries.repository.ContentIOException,
                                          IOException
        Specified by:
        getInputStream in interface org.pentaho.reporting.libraries.repository.ContentItem
        Throws:
        org.pentaho.reporting.libraries.repository.ContentIOException
        IOException
      • isReadable

        public boolean isReadable()
        Specified by:
        isReadable in interface org.pentaho.reporting.libraries.repository.ContentItem
      • isWriteable

        public boolean isWriteable()
        Specified by:
        isWriteable in interface org.pentaho.reporting.libraries.repository.ContentItem