|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ImageFactory
ImageFactory describes the interface to an image factory.
By requiring that image factories, such as
NetpbmImageFactory, implement
this interface, we make it possible to write a single parent image
factory that automatically uses the appropriate child image factory
to load an Image.
| Method Summary | |
|---|---|
boolean |
canLoad(File imageFile)
Tests whether the given image file can be loaded by this ImageFactory. |
boolean |
canLoad(URL imageUrl)
Tests whether the given image URL can be loaded by this ImageFactory. |
List<ImageFormatDescriptor> |
getSupportedImageFormats()
Returns a List of ImageFormatDescriptors that describe
the image formats supported by this ImageFactory. |
Image |
loadImage(File imageFile)
Loads an image from the given file. |
Image |
loadImage(URL imageUrl)
Loads an image from the given URL. |
| Method Detail |
|---|
List<ImageFormatDescriptor> getSupportedImageFormats()
List of ImageFormatDescriptors that describe
the image formats supported by this ImageFactory.
boolean canLoad(File imageFile)
throws IOException
imageFile - the file to be tested
IOException - if there's an error reading the file
boolean canLoad(URL imageUrl)
throws IOException
imageUrl - the URL to be tested
IOException - if there's an error reading the URL
Image loadImage(File imageFile)
throws IOException,
UnknownFormatException
imageFile - an image file
IOException - if there's an error reading the file
UnknownFormatException - if the format is not supported by this
ImageFactory.
Image loadImage(URL imageUrl)
throws IOException,
UnknownFormatException
imageUrl - an image URL
IOException - if there's an error reading from the URL
UnknownFormatException - if the format is not supported by this
ImageFactory.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||