|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrabbit.handler.convert.ExternalProcessConverter
public class ExternalProcessConverter
An image converter that runs an external program to do the actual conversion.
Constructor Summary | |
---|---|
ExternalProcessConverter(SProperties props)
Create a new ExternalProcessConverter configured from the given properties. |
Method Summary | |
---|---|
boolean |
canConvert()
Check if this image converter can do any work. |
void |
closeStreams(Process ps)
Close the streams to the external process. |
void |
convertImage(File from,
File to,
String info)
Convert an image. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExternalProcessConverter(SProperties props)
props
- the configuration for this converterMethod Detail |
---|
public boolean canConvert()
ImageConverter
canConvert
in interface ImageConverter
public void convertImage(File from, File to, String info) throws IOException
ImageConverter
convertImage
in interface ImageConverter
from
- the File that holds the source imageto
- the File to store the converted image ininfo
- some identifier for the image (typically the uri)
IOException
- if the image conversion failspublic void closeStreams(Process ps) throws IOException
ps
- the Process that did the image conversion
IOException
- if close fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |