public abstract class AbstractImageOperation extends Object implements ImageOperation
Constructor and Description |
---|
AbstractImageOperation() |
Modifier and Type | Method and Description |
---|---|
abstract void |
execute(InputStream data,
ImageReader reader,
ImageWriter writer)
Executes a concrete image operation.
|
void |
execute(InputStream data,
String mimeType)
Deprecated.
Use
run(InputStream, String) instead |
protected ImageOperationResult |
getResult() |
ImageOperationResult |
run(InputStream data,
String mimeType)
Runs an image operation and returns the result.
|
protected void |
setResult(InputStream data,
int width,
int height) |
@Deprecated public void execute(InputStream data, String mimeType) throws GalleryException
run(InputStream, String)
insteadGalleryException
public ImageOperationResult run(InputStream data, String mimeType) throws GalleryException
ImageOperation
run
in interface ImageOperation
data
- the image data. The stream is closed by this method.mimeType
- MIME type of the imageGalleryException
- when the image operation failsprotected void setResult(InputStream data, int width, int height)
protected ImageOperationResult getResult()
public abstract void execute(InputStream data, ImageReader reader, ImageWriter writer) throws IOException
data
- the image data. Closing the stream is the responsibility of the caller (i.e. this class).reader
- reader for the image datawriter
- writer for the image dataIOException
- when the image operation failsCopyright © 2007–2019 Hippo B.V. (http://www.onehippo.com). All rights reserved.