Class InputStreamDataSource
java.lang.Object
org.apache.commons.mail2.jakarta.activation.InputStreamDataSource
- All Implemented Interfaces:
jakarta.activation.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 interfacejakarta.activation.DataSource
-
getInputStream
- Specified by:
getInputStream
in interfacejakarta.activation.DataSource
- Throws:
IOException
-
getName
- Specified by:
getName
in interfacejakarta.activation.DataSource
-
getOutputStream
Always throwsUnsupportedOperationException
.- Specified by:
getOutputStream
in interfacejakarta.activation.DataSource
- Returns:
- Always throws
UnsupportedOperationException
. - Throws:
UnsupportedOperationException
- Always throwsUnsupportedOperationException
.
-