org.ceryle.util
Class SimpleFileExporter

java.lang.Object
  extended by java.lang.Thread
      extended by org.ceryle.util.SimpleFileExporter
All Implemented Interfaces:
Runnable

public class SimpleFileExporter
extends Thread

Extends Thread to export a String or Document to a file. This will not check for overwrite; this should be done prior to creating the Thread. This is a simplified copy of FileExporter, removing any references to Ceryle classes, and instead using Log4J for messaging.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SimpleFileExporter(File file, Document doc, ActionListener finishedListener)
          Constructor provided the File to write to, the Document source, and an optional listener to fire off an event upon completion.
SimpleFileExporter(File file, String source, ActionListener finishedListener)
          Constructor provided the File to write to, the Document source (as a String), and an optional listener to fire off an event upon completion.
 
Method Summary
 File getFile()
          Return the file used by this exporter.
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleFileExporter

public SimpleFileExporter(File file,
                          String source,
                          ActionListener finishedListener)
Constructor provided the File to write to, the Document source (as a String), and an optional listener to fire off an event upon completion.


SimpleFileExporter

public SimpleFileExporter(File file,
                          Document doc,
                          ActionListener finishedListener)
Constructor provided the File to write to, the Document source, and an optional listener to fire off an event upon completion.

Method Detail

getFile

public File getFile()
Return the file used by this exporter.


run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.