Package com.adaptris.util.text.mime
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
-
Field Summary
Fields inherited from interface com.adaptris.util.text.mime.MimeConstants
CONTENT_TYPE_OCTET_STREAM, CONTENT_TYPE_TEXT_PLAIN, CONTENT_TYPE_WWW_FORM_URLENCODE, ENCODING_7BIT, ENCODING_8BIT, ENCODING_BASE64, ENCODING_BINARY, ENCODING_QUOTED, ENCODING_UUENCODE, HEADER_CONTENT_DESC, HEADER_CONTENT_ENCODING, HEADER_CONTENT_ID, HEADER_CONTENT_LENGTH, HEADER_CONTENT_TYPE, HEADER_MESSAGE_ID, HEADER_MIME_VERSION
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
InputStreamDataSource
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
- Specified by:
getContentType
in interfacejavax.activation.DataSource
-
getInputStream
- Specified by:
getInputStream
in interfacejavax.activation.DataSource
- Throws:
IOException
-
getName
- Specified by:
getName
in interfacejavax.activation.DataSource
-
getOutputStream
- Specified by:
getOutputStream
in interfacejavax.activation.DataSource
- Throws:
IOException
-
getHeaders
public javax.mail.internet.InternetHeaders getHeaders()- Specified by:
getHeaders
in interfaceMimeHeaders
-