Package adams.data.io.output
Class PlainTextEmailFileWriter
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.io.output.AbstractEmailWriter
-
- adams.data.io.output.AbstractEmailFileWriter
-
- adams.data.io.output.PlainTextEmailFileWriter
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,FileFormatHandler
,LoggingLevelHandler
,LoggingSupporter
,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$
- 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_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description PlainTextEmailFileWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, getDefaultFormatExtension, getOutput, outputTipText, setOutput
-
Methods inherited from class adams.data.io.output.AbstractEmailWriter
check, write
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, 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
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- 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 classAbstractEmailWriter
- Parameters:
email
- the email to write- Returns:
- the error message, null if everything OK
-
-