Class InputStreamDataSource

java.lang.Object
com.adaptris.util.text.mime.InputStreamDataSource
All Implemented Interfaces:
MimeConstants, MimeHeaders, javax.activation.DataSource

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

    • InputStreamDataSource

      public InputStreamDataSource(InputStream input) throws IOException, javax.mail.MessagingException
      Constructor.
      Parameters:
      input - the input stream.
      Throws:
      IOException - if there was an error reading the stream.
      javax.mail.MessagingException - if there was an error initialising the datasource.
  • Method Details

    • getContentType

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

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

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

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

      public javax.mail.internet.InternetHeaders getHeaders()
      Specified by:
      getHeaders in interface MimeHeaders