public class DataHandler extends Object implements Transferable
| Constructor and Description |
|---|
DataHandler(DataSource ds) |
DataHandler(Object data,
String type) |
DataHandler(URL url) |
| Modifier and Type | Method and Description |
|---|---|
CommandInfo[] |
getAllCommands() |
Object |
getBean(CommandInfo cmdinfo) |
CommandInfo |
getCommand(String cmdName) |
Object |
getContent() |
String |
getContentType() |
DataSource |
getDataSource() |
InputStream |
getInputStream() |
String |
getName() |
OutputStream |
getOutputStream() |
CommandInfo[] |
getPreferredCommands() |
Object |
getTransferData(DataFlavor flavor) |
DataFlavor[] |
getTransferDataFlavors() |
boolean |
isDataFlavorSupported(DataFlavor flavor) |
void |
setCommandMap(CommandMap commandMap) |
static void |
setDataContentHandlerFactory(DataContentHandlerFactory newFactory)
Set the DataContentHandlerFactory to use.
|
void |
writeTo(OutputStream os) |
public DataHandler(DataSource ds)
public DataHandler(URL url)
public DataSource getDataSource()
public String getName()
public String getContentType()
public InputStream getInputStream() throws IOException
IOExceptionpublic void writeTo(OutputStream os) throws IOException
IOExceptionpublic OutputStream getOutputStream() throws IOException
IOExceptionpublic DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors in interface Transferablepublic boolean isDataFlavorSupported(DataFlavor flavor)
isDataFlavorSupported in interface Transferablepublic Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
getTransferData in interface TransferableUnsupportedFlavorExceptionIOExceptionpublic CommandInfo[] getPreferredCommands()
public CommandInfo[] getAllCommands()
public CommandInfo getCommand(String cmdName)
public Object getContent() throws IOException
IOExceptionpublic Object getBean(CommandInfo cmdinfo)
public void setCommandMap(CommandMap commandMap)
public static void setDataContentHandlerFactory(DataContentHandlerFactory newFactory)
newFactory - the new factorySecurityException - if the caller does not have "SetFactory" RuntimePermissionCopyright © 2013. All Rights Reserved.