Class InputStreamDataSource
- java.lang.Object
-
- com.iknowbase.api.contentservices.v2impl.support.InputStreamDataSource
-
- All Implemented Interfaces:
javax.activation.DataSource
public class InputStreamDataSource extends Object implements javax.activation.DataSource
A DataSource object encapsulating an InputStream.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getContentType()
InputStream
getInputStream()
String
getName()
OutputStream
getOutputStream()
static javax.activation.DataHandler
newDataHandler(InputStream inputStream, String name, String contentType)
Deprecated.static javax.activation.DataSource
newDataSource(InputStream inputStream, String name, String contentType)
Creates a new DataSource wrapping the specified input stream, using the specified name and contentType.
-
-
-
Method Detail
-
newDataSource
public static javax.activation.DataSource newDataSource(InputStream inputStream, String name, String contentType)
Creates a new DataSource wrapping the specified input stream, using the specified name and contentType.- Parameters:
inputStream
- InputStream to be mappedname
- name to be returned from DataSourcecontentType
- contentType to be returned from DataSource- Returns:
- the newly created DataSource
-
newDataHandler
@Deprecated public static javax.activation.DataHandler newDataHandler(InputStream inputStream, String name, String contentType)
Deprecated.Creates a new DataHandler wrapping a DataSource wrapping the specified input stream; you will never almost need a DataHandler directly, look for methods taking aDataSource
instead.
-
getInputStream
public InputStream getInputStream()
- Specified by:
getInputStream
in interfacejavax.activation.DataSource
-
getOutputStream
public OutputStream getOutputStream()
- Specified by:
getOutputStream
in interfacejavax.activation.DataSource
-
getContentType
public String getContentType()
- Specified by:
getContentType
in interfacejavax.activation.DataSource
-
getName
public String getName()
- Specified by:
getName
in interfacejavax.activation.DataSource
-
-