rabbit.handler.convert
Class ExternalProcessConverter
java.lang.Object
rabbit.handler.convert.ExternalProcessConverter
- All Implemented Interfaces:
- ImageConverter
public class ExternalProcessConverter
- extends Object
- implements ImageConverter
An image converter that runs an external program
to do the actual conversion.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExternalProcessConverter
public ExternalProcessConverter(SProperties props)
canConvert
public boolean canConvert()
- Description copied from interface:
ImageConverter
- Check if this image converter can do any work.
- Specified by:
canConvert
in interface ImageConverter
- Returns:
- true if this image converter can convert.
convertImage
public void convertImage(File from,
File to,
String info)
throws IOException
- Description copied from interface:
ImageConverter
- Convert an image.
- Specified by:
convertImage
in interface ImageConverter
- Parameters:
from
- the File that holds the source imageto
- the File to store the converted image ininfo
- some identifier for the image (typically the uri)
- Throws:
IOException
- if the image conversion fails
closeStreams
public void closeStreams(Process ps)
throws IOException
- Throws:
IOException