Class InputStreamDataSource
- java.lang.Object
-
- org.apache.commons.mail.activation.InputStreamDataSource
-
- All Implemented Interfaces:
javax.activation.DataSource
public final class InputStreamDataSource extends java.lang.Object implements javax.activation.DataSource
A JavaBeans Activation FrameworkDataSourcespecialized forInputStream.Copied from Apache CXF and modified.
- Since:
- 1.6.0
-
-
Constructor Summary
Constructors Constructor Description InputStreamDataSource(java.io.InputStream inputStream, java.lang.String contentType)Constructs a new instance.InputStreamDataSource(java.io.InputStream inputStream, java.lang.String contentType, java.lang.String name)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetContentType()java.io.InputStreamgetInputStream()java.lang.StringgetName()java.io.OutputStreamgetOutputStream()Always throwsUnsupportedOperationException.
-
-
-
Constructor Detail
-
InputStreamDataSource
public InputStreamDataSource(java.io.InputStream inputStream, java.lang.String contentType)
Constructs a new instance.- Parameters:
inputStream- An input stream.contentType- A content type.
-
InputStreamDataSource
public InputStreamDataSource(java.io.InputStream inputStream, java.lang.String contentType, java.lang.String name)
Constructs a new instance.- Parameters:
inputStream- An input stream.contentType- A content type.name- A name.
-
-
Method Detail
-
getContentType
public java.lang.String getContentType()
- Specified by:
getContentTypein interfacejavax.activation.DataSource
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
- Specified by:
getInputStreamin interfacejavax.activation.DataSource- Throws:
java.io.IOException
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfacejavax.activation.DataSource
-
getOutputStream
public java.io.OutputStream getOutputStream()
Always throwsUnsupportedOperationException.- Specified by:
getOutputStreamin interfacejavax.activation.DataSource- Returns:
- Always throws
UnsupportedOperationException. - Throws:
java.lang.UnsupportedOperationException- Always throwsUnsupportedOperationException.
-
-