: Class ObjectDataContentHandler

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.activation
Class ObjectDataContentHandler

    java.lang.Object
      |
      +--javax.activation.ObjectDataContentHandler

All Implemented Interfaces:
  DataContentHandler

public class ObjectDataContentHandler
extends java.lang.Object
implements DataContentHandler

Object Data Content Handler.

Version:
  $Revision: 1.3 $
Author:
  Andrew Selkirk

Constructor Summary
`ObjectDataContentHandler(DataContentHandler handler, java.lang.Object object, java.lang.String mimetype)` Create new object data content handler.

Method Summary
`java.lang.Object` | `getContent(DataSource source)` Get content.
`DataContentHandler` | `getDCH()` Get data content handler.
`java.lang.Object` | `getTransferData(java.awt.datatransfer.DataFlavor flavor, DataSource source)` Get transfer data flavor.
`java.awt.datatransfer.DataFlavor[]` | `getTransferDataFlavors()` Get transfer data flavors.
`void` | `writeTo(java.lang.Object object, java.lang.String mimeType, java.io.OutputStream stream)` Write to.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ObjectDataContentHandler

    public ObjectDataContentHandler(DataContentHandler handler,
                                    java.lang.Object object,
                                    java.lang.String mimetype)

  Create new object data content handler.
  Parameters:
    `handler` - Data content handler
    `object` - Object
    `mimetype` - MIME Type

Method Detail

### getDCH

    public DataContentHandler getDCH()

  Get data content handler.
  Returns:
    Data content handler

### getTransferDataFlavors

    public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()

  Get transfer data flavors.
  Specified by:
    `getTransferDataFlavors` in interface `DataContentHandler`
  Returns:
    List of transfer data flavors

### getTransferData

    public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor,
                                            DataSource source)
                                     throws java.awt.datatransfer.UnsupportedFlavorException,
                                            java.io.IOException

  Get transfer data flavor.
  Specified by:
    `getTransferData` in interface `DataContentHandler`
  Parameters:
    `flavor` - Data flavor
    `source` - Data source
  Throws:
    `java.io.IOException` - IO exception occurred

### getContent

    public java.lang.Object getContent(DataSource source)

  Get content.
  Specified by:
    `getContent` in interface `DataContentHandler`
  Parameters:
    `source` - Data source
  Returns:
    Object content

### writeTo

    public void writeTo(java.lang.Object object,
                        java.lang.String mimeType,
                        java.io.OutputStream stream)
                 throws java.io.IOException

  Write to.
  Specified by:
    `writeTo` in interface `DataContentHandler`
  Parameters:
    `object` - Object to write
    `mimeType` - MIME type of object
    `stream` - Output stream to write to
  Throws:
    `java.io.IOException` - IO exception occurred

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

© Copyright 2002 the Free Software Foundation, all rights reserved.