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 $

构造方法摘要
DataHandler(DataSource ds)
           
DataHandler(Object data, String type)
           
DataHandler(URL url)
           
 
方法摘要
 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)
           
 
从类 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.