adams.data.io.output
Class PlainTextEmailFileWriter

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.data.io.output.AbstractEmailWriter
              extended by adams.data.io.output.AbstractEmailFileWriter
                  extended by adams.data.io.output.PlainTextEmailFileWriter
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, SizeOfHandler, EmailFileWriter, EmailWriter, Serializable

public class PlainTextEmailFileWriter
extends AbstractEmailFileWriter

Writes emails to text files.
Handles only ASCII content.

Valid options are:

-D <int> (property: debugLevel)
    The greater the number the more additional info the scheme may output to 
    the console (0 = off).
    default: 0
    minimum: 0
 
-output <adams.core.io.PlaceholderFile> (property: output)
    The file to write the email to.
    default: ${CWD}
 

Version:
$Revision: 7123 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class adams.data.io.output.AbstractEmailFileWriter
m_Output
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
PlainTextEmailFileWriter()
           
 
Method Summary
protected  String doWrite(Email email)
          Performs the actual writing.
 String getFormatDescription()
          Returns the description of the file format.
 String[] getFormatExtensions()
          Returns the extension(s) of the file format (without dot).
 String globalInfo()
          Returns a string describing the object.
 
Methods inherited from class adams.data.io.output.AbstractEmailFileWriter
defineOptions, getOutput, outputTipText, setOutput
 
Methods inherited from class adams.data.io.output.AbstractEmailWriter
check, write
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface adams.data.io.output.EmailWriter
write
 

Constructor Detail

PlainTextEmailFileWriter

public PlainTextEmailFileWriter()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing the object.

Specified by:
globalInfo in class AbstractOptionHandler
Returns:
a description suitable for displaying in the gui

getFormatDescription

public String getFormatDescription()
Returns the description of the file format.

Returns:
the description

getFormatExtensions

public String[] getFormatExtensions()
Returns the extension(s) of the file format (without dot).

Returns:
the extensions (no dot!)

doWrite

protected String doWrite(Email email)
Performs the actual writing.

Specified by:
doWrite in class AbstractEmailWriter
Parameters:
email - the email to write
Returns:
the error message, null if everything OK


Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.