public class InputStreamDataSource
extends java.lang.Object
implements javax.activation.DataSource
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_TYPE |
Constructor and Description |
---|
InputStreamDataSource(java.io.InputStream in)
Construct a DataSource from an InputStream.
|
InputStreamDataSource(java.io.InputStream in,
java.lang.String ctype)
Construct a DataSource from an InputStream.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentType() |
java.io.InputStream |
getInputStream()
Returns an InputStream.
|
java.lang.String |
getName() |
java.io.OutputStream |
getOutputStream() |
public static final java.lang.String DEFAULT_TYPE
public InputStreamDataSource(java.io.InputStream in)
InputStreamDataSource(InputStream, String)
)in
- Stream to back this DataSourcepublic InputStreamDataSource(java.io.InputStream in, java.lang.String ctype)
in
- Stream to back this DataSourcectype
- mimetype of the data in the InputDtreampublic java.lang.String getContentType()
getContentType
in interface javax.activation.DataSource
public java.lang.String getName()
getName
in interface javax.activation.DataSource
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in interface javax.activation.DataSource
java.io.IOException
public java.io.OutputStream getOutputStream() throws java.io.IOException
getOutputStream
in interface javax.activation.DataSource
java.io.IOException