Class InputStreamDataSource
java.lang.Object
org.apache.commons.mail2.javax.activation.InputStreamDataSource
- All Implemented Interfaces:
DataSource
A JavaBeans Activation Framework
DataSource specialized for InputStream.
Copied from Apache CXF and modified.
- Since:
- 1.6.0
-
Constructor Summary
ConstructorsConstructorDescriptionInputStreamDataSource(InputStream inputStream, String contentType) Constructs a new instance.InputStreamDataSource(InputStream inputStream, String contentType, String name) Constructs a new instance. -
Method Summary
-
Constructor Details
-
InputStreamDataSource
Constructs a new instance.- Parameters:
inputStream- An input stream.contentType- A content type.
-
InputStreamDataSource
Constructs a new instance.- Parameters:
inputStream- An input stream.contentType- A content type.name- A name.
-
-
Method Details
-
getContentType
- Specified by:
getContentTypein interfaceDataSource
-
getInputStream
- Specified by:
getInputStreamin interfaceDataSource- Throws:
IOException
-
getName
- Specified by:
getNamein interfaceDataSource
-
getOutputStream
Always throwsUnsupportedOperationException.- Specified by:
getOutputStreamin interfaceDataSource- Returns:
- Always throws
UnsupportedOperationException. - Throws:
UnsupportedOperationException- Always throwsUnsupportedOperationException.
-