Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools S/MIME Java API Reference 10g Release 3 (10.1.3) B25379-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.security.crypto.smime
Class SmimeDataContentHandler

`java.lang.Object
oracle.security.crypto.smime.SmimeDataContentHandler`

All Implemented Interfaces:
  javax.activation.DataContentHandler

public class SmimeDataContentHandler
extends java.lang.Object
implements javax.activation.DataContentHandler

A DataContentHandler to handle Smime messages.

Constructor Summary
`SmimeDataContentHandler()`

Method Summary
`java.lang.Object` | `getContent(javax.activation.DataSource ds)` Returns the appropriate `SmimeObject` from the DataSource.
`java.lang.Object` | `getTransferData(java.awt.datatransfer.DataFlavor flavor, javax.activation.DataSource source)` Data transfer not supported.
`java.awt.datatransfer.DataFlavor[]` | `getTransferDataFlavors()` Data transfer not supported.
`void` | `writeTo(java.lang.Object obj, java.lang.String mimeType, java.io.OutputStream os)` Output the `SmimeObject` to the specified output stream.

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

Constructor Detail

### SmimeDataContentHandler

    public SmimeDataContentHandler()

Method Detail

### getTransferDataFlavors

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

  Data transfer not supported.
  Specified by:
    `getTransferDataFlavors` in interface `javax.activation.DataContentHandler`

### getTransferData

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

  Data transfer not supported.
  Specified by:
    `getTransferData` in interface `javax.activation.DataContentHandler`
  Throws:
    `java.awt.datatransfer.UnsupportedFlavorException`

### getContent

    public java.lang.Object getContent(javax.activation.DataSource ds)
                                throws java.io.IOException

  Returns the appropriate `SmimeObject` from the DataSource.

  If the content type params for a signed receipt are missing a `SmimeSigned` is returned.

  Specified by:
    `getContent` in interface `javax.activation.DataContentHandler`
  Parameters:
    `ds` - The data source.
  Returns:
    A `SmimeSigned` or `SmimeMultipartSigned` or `SmimeEnveloped` or `SmimeSignedReceipt` Object.
  Throws:
    `java.io.IOException` - If the input is not a S/MIME message or the input encoding is incorrect or an I/O error occurs.

### writeTo

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

  Output the `SmimeObject` to the specified output stream.
  Specified by:
    `writeTo` in interface `javax.activation.DataContentHandler`
  Parameters:
    `obj` - An `SmimeObject`.
    `mimeType` - The mime-type of the `SmimeObject`.
    `os` - The output stream.
  Throws:
    `An` - I/O error occurred or the `SmimeObject` has not been properly initialized.
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools S/MIME Java API Reference 10g Release 3 (10.1.3) B25379-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005, 2006 , Oracle. All rights reserved.