javax.activation
public interface DataContentHandler
Modifier and Type | Method and Description |
---|---|
Object |
getContent(DataSource ds)
Returns an object representing the data in its most preferred form.
|
Object |
getTransferData(DataFlavor df,
DataSource ds)
Returns an object representing the data to be transferred.
|
DataFlavor[] |
getTransferDataFlavors()
Returns a list of the flavors that data can be provided in, ordered
by preference.
|
void |
writeTo(Object obj,
String mimeType,
OutputStream os)
Writes the object as a stream of bytes.
|
DataFlavor[] getTransferDataFlavors()
Object getTransferData(DataFlavor df, DataSource ds) throws UnsupportedFlavorException, IOException
df
- the flavor representing the requested typeds
- the data source of the data to be convertedUnsupportedFlavorException
IOException
Object getContent(DataSource ds) throws IOException
ds
- the data source of the data to be convertedIOException
void writeTo(Object obj, String mimeType, OutputStream os) throws IOException
obj
- the object to convertmimeType
- the MIME type of the streamos
- the byte streamIOException