- java.lang.Object
-
- jakarta.activation.DataHandlerDataSource
-
- All Implemented Interfaces:
DataSource
class DataHandlerDataSource extends java.lang.Object implements DataSource
The DataHanderDataSource class implements the DataSource interface when the DataHandler is constructed with an Object and a mimeType string.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) DataHandlerdataHandler
-
Constructor Summary
Constructors Constructor Description DataHandlerDataSource(DataHandler dh)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetContentType()Returns the MIME type of the data represented by this object.java.io.InputStreamgetInputStream()Returns anInputStreamrepresenting this object.java.lang.StringgetName()Returns the name of this object.java.io.OutputStreamgetOutputStream()Returns theOutputStreamfor this object.
-
-
-
Field Detail
-
dataHandler
DataHandler dataHandler
-
-
Constructor Detail
-
DataHandlerDataSource
public DataHandlerDataSource(DataHandler dh)
The constructor.
-
-
Method Detail
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOExceptionReturns anInputStreamrepresenting this object.- Specified by:
getInputStreamin interfaceDataSource- Returns:
- the
InputStream - Throws:
java.io.IOException- for failures creating the InputStream
-
getOutputStream
public java.io.OutputStream getOutputStream() throws java.io.IOExceptionReturns theOutputStreamfor this object.- Specified by:
getOutputStreamin interfaceDataSource- Returns:
- the
OutputStream - Throws:
java.io.IOException- for failures creating the OutputStream
-
getContentType
public java.lang.String getContentType()
Returns the MIME type of the data represented by this object.- Specified by:
getContentTypein interfaceDataSource- Returns:
- the MIME type
-
getName
public java.lang.String getName()
Returns the name of this object.- Specified by:
getNamein interfaceDataSource- Returns:
- the name of this object
-
-