us.zuercher.gpx2map.source
Class JavaConverter

java.lang.Object
  extended by us.zuercher.gpx2map.source.JavaConverter
All Implemented Interfaces:
Converter

public class JavaConverter
extends Object
implements Converter

JavaConverter is a pure-Java implementation of Converter. It uses the Toolkit to load images and converts them to gzipped PPM Files.


Constructor Summary
JavaConverter()
           
 
Method Summary
 void convert(File imageFile, File compressedPpmFile)
          Converts an image file of arbitrary type into a gzipped PPM file.
 String getCompressedFileExtension()
          Returns the canonical gzip extension, ".gz".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaConverter

public JavaConverter()
Method Detail

convert

public void convert(File imageFile,
                    File compressedPpmFile)
             throws IOException
Converts an image file of arbitrary type into a gzipped PPM file.

Specified by:
convert in interface Converter
Parameters:
imageFile - the source image file
compressedPpmFile - the target image file
Throws:
IOException - if there is an error converting or compressing the file
See Also:
Converter.convert(File, File)

getCompressedFileExtension

public String getCompressedFileExtension()
Returns the canonical gzip extension, ".gz".

Specified by:
getCompressedFileExtension in interface Converter
Returns:
the canonical gzip extension, ".gz".
See Also:
Converter.getCompressedFileExtension()