Top Description Fields Constructors Methods
com.sun.mail.handlers

public Class image_gif

extends handler_base
Class Inheritance
Known Direct Subclasses
com.sun.mail.handlers.image_jpeg
Imports
java.io.*, java.awt.*, javax.activation.*

DataContentHandler for image/gif.

Field Summary

Modifier and TypeField and Description
private static ActivationDataFlavor[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
getContent(DataSource
The DataSource representing the data to be converted.
ds
)

Implements javax.activation.DataContentHandler.getContent.

Return an object representing the data in its most preferred form.
protected ActivationDataFlavor[]
getDataFlavors()

Implements abstract com.sun.mail.handlers.handler_base.getDataFlavors.

Return an array of ActivationDataFlavors that we support.
public void
writeTo(Object
The object to be converted.
obj
,
String
The requested MIME type of the resulting byte stream.
type
,
OutputStream
The output stream into which to write the converted byte stream.
os
)

Implements javax.activation.DataContentHandler.writeTo.

Write the object to the output stream, using the specified MIME type.
Inherited from com.sun.mail.handlers.handler_base:
getDatagetTransferDatagetTransferDataFlavors

Field Detail

myDFback to summary
private static ActivationDataFlavor[] myDF

Constructor Detail

image_gifback to summary
public image_gif()

Method Detail

getContentback to summary
public Object getContent(DataSource ds) throws IOException

Implements javax.activation.DataContentHandler.getContent.

Doc from javax.activation.DataContentHandler.getContent.

Return an object representing the data in its most preferred form. Generally this will be the form described by the first DataFlavor returned by the getTransferDataFlavors method.

Parameters
ds:DataSource

The DataSource representing the data to be converted.

Returns:Object

The constructed Object.

Annotations
@Override
Exceptions
IOException:
if the data can't be accessed
getDataFlavorsback to summary
protected ActivationDataFlavor[] getDataFlavors()

Implements abstract com.sun.mail.handlers.handler_base.getDataFlavors.

Doc from com.sun.mail.handlers.handler_base.getDataFlavors.

Return an array of ActivationDataFlavors that we support. Usually there will be only one.

Returns:ActivationDataFlavor[]

array of ActivationDataFlavors that we support

Annotations
@Override
writeToback to summary
public void writeTo(Object obj, String type, OutputStream os) throws IOException

Implements javax.activation.DataContentHandler.writeTo.

Write the object to the output stream, using the specified MIME type.

Parameters
obj:Object

Doc from javax.activation.DataContentHandler.writeTo.

The object to be converted.

type:String

Doc from javax.activation.DataContentHandler.writeTo.

The requested MIME type of the resulting byte stream.

os:OutputStream

Doc from javax.activation.DataContentHandler.writeTo.

The output stream into which to write the converted byte stream.

Annotations
@Override
Exceptions
IOException:

Doc from javax.activation.DataContentHandler.writeTo.

errors writing to the stream