com.ibm.openpages.api.resource

Interface IDocument

  • All Superinterfaces:
    IGRCObject, IResource


    public interface IDocument
    extends IGRCObject
    Represents a single version of a document stored in the system. The IDocument can have content data associated with it.
    • Method Detail

      • getContentLength

        long getContentLength()
        Returns the length of the content associated with this document.
        Returns:
        the length of the content associated with this document. If no document is associated, a length of zero is returned.
      • getFileTypeDefinition

        IFileTypeDefinition getFileTypeDefinition()
        Returns the file type definition.
        Returns:
        the file type definition
      • getContent

        java.io.InputStream getContent()
        Returns the file content for this document.
        Returns:
        the file content for this document if one exists, otherwise an empty input stream
      • setContent

        void setContent(java.io.InputStream contentStream,
                        long contentLength)
        Sets the file content for this document.
        Parameters:
        contentLength - the length content in bytes
        content - the content for this document
      • setContent

        void setContent(java.io.InputStream contentStream,
                        long contentLength,
                        IFileTypeDefinition fileTypeDefinition)
        Sets the file content for this document.
        Parameters:
        contentStream - the file content for this document
        contentLength - the length content in bytes
        fileTypeDefinition - the file type definition for this content
      • setContent

        void setContent(byte[] content)
        Sets the file content for this document.
        Parameters:
        content - the file content for this document
      • setContent

        void setContent(byte[] content,
                        IFileTypeDefinition fileTypeDefinition)
        Sets the file content for this document.
        Parameters:
        content - the file content for this document
        fileTypeDefinition - the file type definition for this content

Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2022. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.