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
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 interfacejakarta.activation.DataSource
-
getInputStream
- Specified by:
getInputStreamin interfacejakarta.activation.DataSource- Throws:
IOException
-
getName
- Specified by:
getNamein interfacejakarta.activation.DataSource
-
getOutputStream
Always throwsUnsupportedOperationException.- Specified by:
getOutputStreamin interfacejakarta.activation.DataSource- Returns:
- Always throws
UnsupportedOperationException. - Throws:
UnsupportedOperationException- Always throwsUnsupportedOperationException.
-