|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.coobird.thumbnailator.tasks.ThumbnailTask<File,File>
net.coobird.thumbnailator.tasks.FileThumbnailTask
public class FileThumbnailTask
A thumbnail generation task which reads and writes data from and to a
File.
Only the first image included in the image file will be read. Subsequent images included in the image file will be ignored.
| Constructor Summary | |
|---|---|
FileThumbnailTask(ThumbnailParameter param,
File sourceFile,
File destinationFile)
Creates a ThumbnailTask in which image data is read from the
specified File and is output to a specified File, using
the parameters provided in the specified ThumbnailParameter. |
|
| Method Summary | |
|---|---|
File |
getDestination()
Returns the destination to which the thumbnail is stored or written. |
ThumbnailParameter |
getParam()
Returns the ThumbnailParameter for this ThumbnailTask,
used when performing a thumbnail generation operation. |
File |
getSource()
Returns the source from which the source image is retrieved or read. |
BufferedImage |
read()
Reads a source image. |
void |
write(BufferedImage img)
Writes the thumbnail to the destination. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileThumbnailTask(ThumbnailParameter param,
File sourceFile,
File destinationFile)
ThumbnailTask in which image data is read from the
specified File and is output to a specified File, using
the parameters provided in the specified ThumbnailParameter.
param - The parameters to use to create the thumbnail.sourceFile - The File from which image data is read.destinationFile - The File to which thumbnail is written.
NullPointerException - If the parameter is null.| Method Detail |
|---|
public BufferedImage read()
throws IOException
ThumbnailTask
read in class ThumbnailTask<File,File>IOException - Thrown when an I/O problem occurs when reading
from the image source.
public void write(BufferedImage img)
throws IOException
ThumbnailTask
write in class ThumbnailTask<File,File>img - The image to write.
UnsupportedFormatException - When an image file which is to be
read or written is unsupported.
IOException - Thrown when an I/O problem occurs when writing the
image.public ThumbnailParameter getParam()
ThumbnailTaskThumbnailParameter for this ThumbnailTask,
used when performing a thumbnail generation operation.
getParam in class ThumbnailTask<File,File>public File getSource()
ThumbnailTask
getSource in class ThumbnailTask<File,File>public File getDestination()
ThumbnailTask
getDestination in class ThumbnailTask<File,File>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||