Interface ViewableContent


public interface ViewableContent
Interface for obtaining content from the NiFi content repository.
  • Field Details

  • Method Details

    • getContentStream

      InputStream getContentStream()
      Returns:
      stream to the viewable content. The data stream can only be read once so an extension can call this method or getContent
    • getContent

      String getContent() throws IOException
      Returns:
      the content as a string. The data stream can only be read once so an extension can call this method or getContentStream
      Throws:
      IOException - if unable to read content
    • getDisplayMode

      ViewableContent.DisplayMode getDisplayMode()
      Returns:
      the desired display mode. If the mode is Hex the framework will handle generating the mark up. The only values that an extension will see is Original or Formatted
    • getFileName

      String getFileName()
      Returns:
      contents file name
    • getContentType

      String getContentType()
      Returns:
      mime type of the content, value is lowercase and stripped of all parameters if there were any
    • getRawContentType

      String getRawContentType()
      Returns:
      unchanged mime type of the content