Package adams.data.io.input
Class EmlEmailFileReader
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,FileFormatHandler,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,EmailFileReader,EmailReader,Serializable
public class EmlEmailFileReader extends AbstractEmailFileReader
Reads emails stored in EML files.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-input <adams.core.io.PlaceholderFile> (property: input) The file to read the email from. default: ${CWD}- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.data.io.input.AbstractEmailFileReader
m_Input
-
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 EmlEmailFileReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected EmaildoRead()Performs the actual reading.StringgetFormatDescription()Returns the description of the file format.String[]getFormatExtensions()Returns the extension(s) of the file format (without dot).StringglobalInfo()Returns a string describing the object.protected String[]toString(jodd.mail.EmailAddress[] addresses)Turns the jodd email address arrays into string ones.-
Methods inherited from class adams.data.io.input.AbstractEmailFileReader
check, defineOptions, getDefaultFormatExtension, getInput, inputTipText, setInput
-
Methods inherited from class adams.data.io.input.AbstractEmailReader
read
-
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.input.EmailReader
read
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin 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!)
-
toString
protected String[] toString(jodd.mail.EmailAddress[] addresses)
Turns the jodd email address arrays into string ones.- Parameters:
addresses- the array to convert- Returns:
- the converted array
-
doRead
protected Email doRead()
Performs the actual reading.- Specified by:
doReadin classAbstractEmailReader- Returns:
- the email that was read, null in case of error
-
-