Package javax.activation
Class DataHandlerDataSource
java.lang.Object
javax.activation.DataHandlerDataSource
- All Implemented Interfaces:
DataSource
The DataHanderDataSource class implements the
DataSource interface when the DataHandler is constructed
with an Object and a mimeType string.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the MIME type of the data represented by this object.Returns anInputStream
representing this object.getName()
Returns the name of this object.Returns theOutputStream
for this object.
-
Field Details
-
dataHandler
DataHandler dataHandler
-
-
Constructor Details
-
DataHandlerDataSource
The constructor.
-
-
Method Details
-
getInputStream
Returns anInputStream
representing this object.- Specified by:
getInputStream
in interfaceDataSource
- Returns:
- the
InputStream
- Throws:
IOException
- for failures creating the InputStream
-
getOutputStream
Returns theOutputStream
for this object.- Specified by:
getOutputStream
in interfaceDataSource
- Returns:
- the
OutputStream
- Throws:
IOException
- for failures creating the OutputStream
-
getContentType
Returns the MIME type of the data represented by this object.- Specified by:
getContentType
in interfaceDataSource
- Returns:
- the MIME type
-
getName
Returns the name of this object.- Specified by:
getName
in interfaceDataSource
- Returns:
- the name of this object
-