org.eclipse.swt.internal.image
Class FileFormat

java.lang.Object
  extended by org.eclipse.swt.internal.image.FileFormat
Direct Known Subclasses:
GIFFileFormat, JPEGFileFormat, OS2BMPFileFormat, PNGFileFormat, TIFFFileFormat, WinBMPFileFormat, WinICOFileFormat

public abstract class FileFormat
extends java.lang.Object

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


Constructor Summary
FileFormat()
           
 
Method Summary
static ImageData[] load(java.io.InputStream is, ImageLoader loader)
          Read the specified input stream using the specified loader, and return the device independent image array represented by the stream.
 ImageData[] loadFromStream(org.eclipse.swt.internal.image.LEDataInputStream stream)
          Read the specified input stream, and return the device independent image array represented by the stream.
static void save(java.io.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.
 void unloadIntoStream(ImageLoader loader, org.eclipse.swt.internal.image.LEDataOutputStream stream)
          Write the device independent image array stored in the specified loader 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

FileFormat

public FileFormat()
Method Detail

loadFromStream

public ImageData[] loadFromStream(org.eclipse.swt.internal.image.LEDataInputStream stream)
Read the specified input stream, and return the device independent image array represented by the stream.


load

public static ImageData[] load(java.io.InputStream is,
                               ImageLoader loader)
Read the specified input stream using the specified loader, and return the device independent image array represented by the stream.


save

public static void save(java.io.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.


unloadIntoStream

public void unloadIntoStream(ImageLoader loader,
                             org.eclipse.swt.internal.image.LEDataOutputStream stream)
Write the device independent image array stored in the specified loader to the specified output stream.