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
ConstructorDescriptionInputStreamDataSource
(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:
getContentType
in interfaceDataSource
-
getInputStream
- Specified by:
getInputStream
in interfaceDataSource
- Throws:
IOException
-
getName
- Specified by:
getName
in interfaceDataSource
-
getOutputStream
Always throwsUnsupportedOperationException
.- Specified by:
getOutputStream
in interfaceDataSource
- Returns:
- Always throws
UnsupportedOperationException
. - Throws:
UnsupportedOperationException
- Always throwsUnsupportedOperationException
.
-