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
IOException
public void writeTo(OutputStream os) throws IOException
IOException
public OutputStream getOutputStream() throws IOException
IOException
public DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors
in interface Transferable
public boolean isDataFlavorSupported(DataFlavor flavor)
isDataFlavorSupported
in interface Transferable
public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
getTransferData
in interface Transferable
UnsupportedFlavorException
IOException
public CommandInfo[] getPreferredCommands()
public CommandInfo[] getAllCommands()
public CommandInfo getCommand(String cmdName)
public Object getContent() throws IOException
IOException
public 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.