java.lang.Object
jakarta.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 anInputStreamrepresenting this object.getName()Returns the name of this object.Returns theOutputStreamfor this object.
-
Field Details
-
dataHandler
DataHandler dataHandler
-
-
Constructor Details
-
DataHandlerDataSource
The constructor.
-
-
Method Details
-
getInputStream
Returns anInputStreamrepresenting this object.- Specified by:
getInputStreamin interfaceDataSource- Returns:
- the
InputStream - Throws:
IOException- for failures creating the InputStream
-
getOutputStream
Returns theOutputStreamfor this object.- Specified by:
getOutputStreamin 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:
getContentTypein interfaceDataSource- Returns:
- the MIME type
-
getName
Returns the name of this object.- Specified by:
getNamein interfaceDataSource- Returns:
- the name of this object
-