Interface ImageSource<T>
-
- Type Parameters:
T- The source class from which the source image is retrieved or read.
- All Known Implementing Classes:
AbstractImageSource,BufferedImageSource,FileImageSource,FileImageSource.UninitializedImageSource,InputStreamImageSource,URLImageSource
public interface ImageSource<T>An interface to be implemented by classes which read or retrieve images from which a thumbnail should be produced.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetInputFormatName()Returns the name of the image format.TgetSource()Returns the source from which the image is read or retrieved.java.awt.image.BufferedImageread()Retrieves the image from the source.voidsetThumbnailParameter(ThumbnailParameter param)Sets theThumbnailParameterfrom which to retrieve parameters to use when retrieving the image.
-
-
-
Method Detail
-
read
java.awt.image.BufferedImage read() throws java.io.IOExceptionRetrieves the image from the source.- Returns:
- The image.
- Throws:
java.io.IOException- When a problem occurs while reading or obtaining the image.
-
getInputFormatName
java.lang.String getInputFormatName()
Returns the name of the image format.- Returns:
- The image format name. If there is no
image format information, then
nullwill be returned. - Throws:
java.lang.IllegalStateException- If the source image has not been read yet.
-
setThumbnailParameter
void setThumbnailParameter(ThumbnailParameter param)
Sets theThumbnailParameterfrom which to retrieve parameters to use when retrieving the image.- Parameters:
param- TheThumbnailParameterwith image reading parameters.
-
getSource
T getSource()
Returns the source from which the image is read or retrieved.- Returns:
- The source of the image.
-
-