JIU 0.12.0 Homepage

net.sourceforge.jiu.apps
Class ImageLoadTester

java.lang.Object
  extended bynet.sourceforge.jiu.ops.Operation
      extended bynet.sourceforge.jiu.ops.BatchProcessorOperation
          extended bynet.sourceforge.jiu.apps.ImageLoadTester

public class ImageLoadTester
extends BatchProcessorOperation

Command line program that tries to load images from files, thus testing the built-in and / or Toolkit's codecs. Start the program with file names or directory names as arguments. Directory names will lead to the inclusion of that complete directory tree in the list of files to test. Add the argument --notoolkit in order to keep this program from trying to load images via java.awt.Toolkit. The program will process all files and print one line per file that tells the result of the loading process. At the end, three lines with statistics (failed / successful / total loading attempts) are printed. Note that you may want to give the JVM more memory if large images are stored in those files you want to test. Example:

java -mx300m net.sourceforge.jiu.apps.ImageLoadTester *.jpg
This gives 300 MB to the JVM.

Since:
0.11.0
Author:
Marco Schmidt

Constructor Summary
ImageLoadTester()
           
 
Method Summary
static void main(String[] args)
          Main method of this command line program.
 void processFile(String inputDirectory, String inputFileName, String outputDirectory)
          Tries to load an image from a file.
 void setUseToolkit(boolean newValue)
          Specifies whether java.awt.Toolkit is supposed to be used when trying to load an image.
 
Methods inherited from class net.sourceforge.jiu.ops.BatchProcessorOperation
addDirectoryTree, addDirectoryTree, addInputFileName, addInputFileNames, getErrorMessages, getOverwrite, process, setCollectErrorMessages, setOutputDirectory, setOverwrite
 
Methods inherited from class net.sourceforge.jiu.ops.Operation
addProgressListener, addProgressListeners, getAbort, removeProgressListener, setAbort, setProgress, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageLoadTester

public ImageLoadTester()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Main method of this command line program.

Parameters:
args - program arguments, provided by the Java Virtual Machine, must be file or directory names
Throws:
Exception

processFile

public void processFile(String inputDirectory,
                        String inputFileName,
                        String outputDirectory)
Tries to load an image from a file. Prints a message to standard output and increases certain internal counters for statistics.

Specified by:
processFile in class BatchProcessorOperation
Parameters:
inputDirectory - directory where the file resides
inputFileName - name of file
outputDirectory - not used, this argument is demanded by the parent class+

setUseToolkit

public void setUseToolkit(boolean newValue)
Specifies whether java.awt.Toolkit is supposed to be used when trying to load an image.

Parameters:
newValue - boolean, true if Toolkit is to be used, false otherwise

JIU 0.12.0 Homepage

Copyright © 2000, 2001, 2002, 2003, 2004 Marco Schmidt