|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.coobird.thumbnailator.tasks.ThumbnailTask<S,D> net.coobird.thumbnailator.tasks.SourceSinkThumbnailTask<S,D>
S
- The source class from which the source image is retrieved
or read.D
- The destination class to which the thumbnail is stored
or written.public class SourceSinkThumbnailTask<S,D>
A ThumbnailTask
which holds an ImageSource
from which the
image is read or retrieved, and an ImageSink
to which the thumbnail
is stored or written.
This class will take care of handing off information from the
ImageSource
to the ImageSink
. For example, the output format
that should be used by the ImageSink
will be handed off if the
ThumbnailParameter.ORIGINAL_FORMAT
parameter is set.
Constructor Summary | |
---|---|
SourceSinkThumbnailTask(ThumbnailParameter param,
ImageSource<S> source,
ImageSink<D> destination)
Creates a ThumbnailTask in which an image is retrived from the
specified ImageSource and written to the specified
ImageSink , using the parameters provided in the specified
ThumbnailParameter . |
Method Summary | |
---|---|
D |
getDestination()
Returns the destination to which the thumbnail is stored or written. |
S |
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 net.coobird.thumbnailator.tasks.ThumbnailTask |
---|
getParam |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SourceSinkThumbnailTask(ThumbnailParameter param, ImageSource<S> source, ImageSink<D> destination)
ThumbnailTask
in which an image is retrived from the
specified ImageSource
and written to the specified
ImageSink
, using the parameters provided in the specified
ThumbnailParameter
.
param
- The parameters to use to create the thumbnail.source
- The source from which the image is retrieved
or read from.destination
- The destination to which the thumbnail is
stored or written to.
NullPointerException
- If either the parameter,
ImageSource
or ImageSink
is null
.Method Detail |
---|
public BufferedImage read() throws IOException
ThumbnailTask
read
in class ThumbnailTask<S,D>
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<S,D>
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 S getSource()
ThumbnailTask
getSource
in class ThumbnailTask<S,D>
public D getDestination()
ThumbnailTask
getDestination
in class ThumbnailTask<S,D>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |