Class InputStreamDataSource

java.lang.Object
org.frankframework.http.InputStreamDataSource
All Implemented Interfaces:
jakarta.activation.DataSource, javax.activation.DataSource

public class InputStreamDataSource extends Object implements javax.activation.DataSource, jakarta.activation.DataSource
  • Constructor Details

    • InputStreamDataSource

      public InputStreamDataSource(String contentType, InputStream inputStream)
      Use content type application/octet-stream in case it cannot be determined. See http://docs.oracle.com/javase/7/docs/api/javax/activation/DataSource.html#getContentType(): This method returns the MIME type of the data in the form of a string. It should always return a valid type. It is suggested that getContentType return "application/octet-stream" if the DataSource implementation can not determine the data type.
  • Method Details

    • getContentType

      public String getContentType()
      Specified by:
      getContentType in interface jakarta.activation.DataSource
      Specified by:
      getContentType in interface javax.activation.DataSource
    • getInputStream

      public InputStream getInputStream() throws IOException
      Specified by:
      getInputStream in interface jakarta.activation.DataSource
      Specified by:
      getInputStream in interface javax.activation.DataSource
      Throws:
      IOException
    • getName

      public String getName()
      Specified by:
      getName in interface jakarta.activation.DataSource
      Specified by:
      getName in interface javax.activation.DataSource
    • getOutputStream

      public OutputStream getOutputStream() throws IOException
      Specified by:
      getOutputStream in interface jakarta.activation.DataSource
      Specified by:
      getOutputStream in interface javax.activation.DataSource
      Throws:
      IOException