API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.activation. DataHandler View Source
Author(s)
Since
1.6
Version
Serial
Hierarchy
 Object
      DataHandler
Implements
 Transferable
Subclasses
Description
public class DataHandler
  The DataHandler class provides a consistent interface to data available in many different sources and formats.
Constructors
public DataHandler (DataSource ds)
  Create a DataHandler instance referencing the specified DataSource.
public DataHandler (Object obj, String mimeType)
  Create a DataHandler instance representing an object of this MIME type.
public DataHandler (URL url)
  Create a DataHandler instance referencing a URL.
Methods
Hide/Show inherited methods
public CommandInfo getAllCommands ()
  Return all the commands for this type of data.
public Object getBean (CommandInfo cmdinfo)
  A convenience method that takes a CommandInfo object and instantiates the corresponding command, usually a JavaBean component.
public CommandInfo getCommand (String cmdName)
  Get the command cmdName.
public Object getContent () throws IOException
  Return the data in its preferred Object form.
public String getContentType ()
  Return the MIME type of this object as retrieved from the source object.
public DataSource getDataSource ()
  Return the DataSource associated with this instance of DataHandler.
public InputStream getInputStream () throws IOException
  Get the InputStream for this object.
public String getName ()
  Return the name of the data object.
public OutputStream getOutputStream () throws IOException
  Get an OutputStream for this DataHandler to allow overwriting the underlying data.
public CommandInfo getPreferredCommands ()
  Return the preferred commands for this type of data.
public Object getTransferData (DataFlavor flavor) throws UnsupportedFlavorException IOException [Specified in Transferable]
  Returns an object that represents the data to be transferred.
publicsynchronized DataFlavor getTransferDataFlavors () [Specified in Transferable]
  Return the DataFlavors in which this data is available.
public boolean isDataFlavorSupported (DataFlavor flavor) [Specified in Transferable]
  Returns whether the specified data flavor is supported for this object.
publicsynchronized void setCommandMap (CommandMap commandMap)
  Set the CommandMap for use by this DataHandler.
publicstaticsynchronized void setDataContentHandlerFactory (DataContentHandlerFactory newFactory)
  Sets the DataContentHandlerFactory.
public void writeTo (OutputStream os) throws IOException
  Write the data to an OutputStream.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar