javax.activation
类 DataHandler
java.lang.Object
javax.activation.DataHandler
- 所有已实现的接口:
- Transferable
public class DataHandler
- extends Object
- implements Transferable
- 版本:
- $Rev: 467742 $ $Date: 2011/05/07 04:32:39 $
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataHandler
public DataHandler(DataSource ds)
DataHandler
public DataHandler(Object data,
String type)
DataHandler
public DataHandler(URL url)
getDataSource
public DataSource getDataSource()
getName
public String getName()
getContentType
public String getContentType()
getInputStream
public InputStream getInputStream()
throws IOException
- 抛出:
IOException
writeTo
public void writeTo(OutputStream os)
throws IOException
- 抛出:
IOException
getOutputStream
public OutputStream getOutputStream()
throws IOException
- 抛出:
IOException
getTransferDataFlavors
public DataFlavor[] getTransferDataFlavors()
- 指定者:
- 接口
Transferable 中的 getTransferDataFlavors
isDataFlavorSupported
public boolean isDataFlavorSupported(DataFlavor flavor)
- 指定者:
- 接口
Transferable 中的 isDataFlavorSupported
getTransferData
public Object getTransferData(DataFlavor flavor)
throws UnsupportedFlavorException,
IOException
- 指定者:
- 接口
Transferable 中的 getTransferData
- 抛出:
UnsupportedFlavorException
IOException
getPreferredCommands
public CommandInfo[] getPreferredCommands()
getAllCommands
public CommandInfo[] getAllCommands()
getCommand
public CommandInfo getCommand(String cmdName)
getContent
public Object getContent()
throws IOException
- 抛出:
IOException
getBean
public Object getBean(CommandInfo cmdinfo)
setCommandMap
public void setCommandMap(CommandMap commandMap)
setDataContentHandlerFactory
public static void setDataContentHandlerFactory(DataContentHandlerFactory newFactory)
- Set the DataContentHandlerFactory to use.
If this method has already been called then an Error is raised.
- 参数:
newFactory - the new factory
- 抛出:
SecurityException - if the caller does not have "SetFactory" RuntimePermission
Copyright © 2013. All Rights Reserved.