Top Description Fields Constructors Methods
org.eclipse.swt.internal.image

public abstract Class FileFormat

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.swt.internal.image.GIFFileFormat, org.eclipse.swt.internal.image.JPEGFileFormat, org.eclipse.swt.internal.image.OS2BMPFileFormat, org.eclipse.swt.internal.image.PNGFileFormat, org.eclipse.swt.internal.image.TIFFFileFormat, org.eclipse.swt.internal.image.WinBMPFileFormat, org.eclipse.swt.internal.image.WinICOFileFormat
Imports
java.io.*, org.eclipse.swt.*, org.eclipse.swt.graphics.*

Abstract factory class for loading/unloading images from files or streams in various image file formats.

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv static final String
pack-priv static final String
pack-priv static final String[]
pack-priv LEDataInputStream
pack-priv ImageLoader
pack-priv LEDataOutputStream

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv static FileFormat
pack-priv abstract boolean
isFileFormat(LEDataInputStream stream)

Return whether or not the specified input stream represents a supported file format.

public static ImageData[]
load(InputStream is, ImageLoader loader)

Read the specified input stream using the specified loader, and return the device independent image array represented by the stream.

pack-priv abstract ImageData[]
public ImageData[]
loadFromStream(LEDataInputStream stream)

Read the specified input stream, and return the device independent image array represented by the stream.

public static void
save(OutputStream os, int format, ImageLoader loader)

Write the device independent image array stored in the specified loader to the specified output stream using the specified file format.

pack-priv abstract void
public void
unloadIntoStream(ImageLoader loader, LEDataOutputStream stream)

Write the device independent image array stored in the specified loader to the specified output stream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

compressionback to summary
pack-priv int compression
FORMAT_PACKAGEback to summary
pack-priv static final String FORMAT_PACKAGE
FORMAT_SUFFIXback to summary
pack-priv static final String FORMAT_SUFFIX
FORMATSback to summary
pack-priv static final String[] FORMATS
inputStreamback to summary
pack-priv LEDataInputStream inputStream
loaderback to summary
pack-priv ImageLoader loader
outputStreamback to summary
pack-priv LEDataOutputStream outputStream

Constructor Detail

FileFormatback to summary
public FileFormat()

Method Detail

getFileFormatback to summary
pack-priv static FileFormat getFileFormat(LEDataInputStream stream, String format) throws Exception
isFileFormatback to summary
pack-priv abstract boolean isFileFormat(LEDataInputStream stream)

Return whether or not the specified input stream represents a supported file format.

loadback to summary
public static ImageData[] load(InputStream is, ImageLoader loader)

Read the specified input stream using the specified loader, and return the device independent image array represented by the stream.

loadFromByteStreamback to summary
pack-priv abstract ImageData[] loadFromByteStream()
loadFromStreamback to summary
public ImageData[] loadFromStream(LEDataInputStream stream)

Read the specified input stream, and return the device independent image array represented by the stream.

saveback to summary
public static void save(OutputStream os, int format, ImageLoader loader)

Write the device independent image array stored in the specified loader to the specified output stream using the specified file format.

unloadIntoByteStreamback to summary
pack-priv abstract void unloadIntoByteStream(ImageLoader loader)
unloadIntoStreamback to summary
public void unloadIntoStream(ImageLoader loader, LEDataOutputStream stream)

Write the device independent image array stored in the specified loader to the specified output stream.