| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.coobird.thumbnailator.tasks.ThumbnailTask<InputStream,OutputStream>
net.coobird.thumbnailator.tasks.StreamThumbnailTask
public class StreamThumbnailTask
A thumbnail generation task which streams data from an InputStream
 to an OutputStream.
 
 This class does not close the InputStream and OutputStream
 upon the completion of processing.
 
Only the first image obtained from the data stream will be read. Subsequent images will be ignored.
| Constructor Summary | |
|---|---|
StreamThumbnailTask(ThumbnailParameter param,
                    InputStream is,
                    OutputStream os)
Creates a ThumbnailTask in which streamed image data from the
 specified InputStream is output to a specified
 OutputStream, using the parameters provided in the specified
 ThumbnailParameter. | 
|
| Method Summary | |
|---|---|
 OutputStream | 
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. | 
 InputStream | 
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 StreamThumbnailTask(ThumbnailParameter param,
                           InputStream is,
                           OutputStream os)
ThumbnailTask in which streamed image data from the
 specified InputStream is output to a specified
 OutputStream, using the parameters provided in the specified
 ThumbnailParameter.
param - The parameters to use to create the thumbnail.is - The InputStream from which to obtain image data.os - The OutputStream to send thumbnail data to.
NullPointerException - If the parameter is null.| Method Detail | 
|---|
public BufferedImage read()
                   throws IOException
ThumbnailTask
read in class ThumbnailTask<InputStream,OutputStream>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<InputStream,OutputStream>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<InputStream,OutputStream>public InputStream getSource()
ThumbnailTask
getSource in class ThumbnailTask<InputStream,OutputStream>public OutputStream getDestination()
ThumbnailTask
getDestination in class ThumbnailTask<InputStream,OutputStream>
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||