Interface Content

All Known Implementing Classes:
AbstractContent, ByteContent, FileContent, InputStreamContent, URLContent

public interface Content
Content describes a group of bytes with associated mime type information. *
  • Method Details

    • getContentType

      String getContentType()
      The type of content.
      Returns:
      the mime content type for this content.
    • getInputStream

      InputStream getInputStream() throws IOException
      The content bytes as a stream.
      Returns:
      an InputStream from which content can be read.
      Throws:
      IOException - if an error occurs while creating the stream.
    • getLastModified

      Date getLastModified()
      When the content was modified.
      Returns:
      Date when the content was modified.
    • getLength

      Long getLength()
      How much content there is.
      Returns:
      the actual content length, or -1 if unknown.
    • getSha256

      String getSha256() throws Exception
      Digest of content.
      Returns:
      base64 encoded sha256 of content bytes.
      Throws:
      Exception - if error occurs
    • close

      void close()
      Free any resources associated with this content.