DataContentHandler
image_gif
, message_rfc822
, multipart_mixed
, text_plain
public abstract class handler_base extends Object implements DataContentHandler
Constructor | Description |
---|---|
handler_base() |
Modifier and Type | Method | Description |
---|---|---|
protected Object |
getData(ActivationDataFlavor aFlavor,
DataSource ds) |
Given the flavor that matched, return the appropriate type of object.
|
protected abstract ActivationDataFlavor[] |
getDataFlavors() |
Return an array of ActivationDataFlavors that we support.
|
Object |
getTransferData(DataFlavor df,
DataSource ds) |
Return the Transfer Data of type DataFlavor from InputStream.
|
DataFlavor[] |
getTransferDataFlavors() |
Return the DataFlavors for this
DataContentHandler . |
getContent, writeTo
protected abstract ActivationDataFlavor[] getDataFlavors()
protected Object getData(ActivationDataFlavor aFlavor, DataSource ds) throws IOException
aFlavor
- the ActivationDataFlavords
- DataSource containing the dataIOException
- for errors reading the datapublic DataFlavor[] getTransferDataFlavors()
DataContentHandler
.getTransferDataFlavors
in interface DataContentHandler
public Object getTransferData(DataFlavor df, DataSource ds) throws IOException
getTransferData
in interface DataContentHandler
df
- The DataFlavords
- The DataSource corresponding to the dataIOException
- for errors reading the dataCopyright © 2018 Oracle. All rights reserved.