Class InternalResource

    • Constructor Detail

      • InternalResource

        public InternalResource​(String resourceName,
                                String description)
        Creates an InternalResource.
        Parameters:
        resourceName - the resource name.
        description - the description of the resource (e.g. file name).
    • Method Detail

      • getBytes

        public byte[] getBytes()
        Description copied from interface: ContentAccess
        The bytes that make up the document content.
        Specified by:
        getBytes in interface ContentAccess
        Returns:
        the data from the resource, or an empty byte array.
      • getDescription

        public String getDescription()
        Some text that describes the document content. This text could be the document filename or title, for instance.
        Specified by:
        getDescription in interface ContentAccess
        Returns:
        a short document description
      • getMimeType

        public String getMimeType()
        The mime type of the document. For example, "image/jpeg", "image/gif", "application/pdf" etc
        Specified by:
        getMimeType in interface ContentAccess
        Returns:
        the mime type.
      • getResourceName

        public String getResourceName()
        Returns:
        the name (path) of the resource.
      • getTargetUrl

        public String getTargetUrl()
        Returns:
        the URL which can be used to target this resource.