Package adams.data.io.input
Class SingleStringTextReader
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.io.input.AbstractTextReader<T>
-
- adams.data.io.input.AbstractTextReaderWithEncoding<String>
-
- adams.data.io.input.SingleStringTextReader
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Serializable
public class SingleStringTextReader extends AbstractTextReaderWithEncoding<String>
Reads all text data into a single string and returns that
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-encoding <adams.core.base.BaseCharset> (property: encoding) The type of encoding to use when reading the file, use empty string for default. default: Default
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Scanner
m_Scanner
the scanner in use.-
Fields inherited from class adams.data.io.input.AbstractTextReaderWithEncoding
m_Encoding
-
Fields inherited from class adams.data.io.input.AbstractTextReader
m_Stream
-
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 SingleStringTextReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
doNext()
Returns the next lot of data.Class
generates()
Returns the class of the data that it returns.String
globalInfo()
Returns a string describing the object.void
initialize(InputStream stream)
Initializes the input stream to read the content from.-
Methods inherited from class adams.data.io.input.AbstractTextReaderWithEncoding
defineOptions, encodingTipText, getEncoding, getQuickInfo, setEncoding
-
Methods inherited from class adams.data.io.input.AbstractTextReader
hasNext, next, reset
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, 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.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Scanner
protected transient Scanner m_Scanner
the scanner in use.
-
-
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
-
generates
public Class generates()
Returns the class of the data that it returns.- Specified by:
generates
in classAbstractTextReader<String>
- Returns:
- the generated data type
-
initialize
public void initialize(InputStream stream)
Initializes the input stream to read the content from.- Overrides:
initialize
in classAbstractTextReader<String>
- Parameters:
stream
- the input stream to use
-
doNext
protected String doNext()
Returns the next lot of data.- Specified by:
doNext
in classAbstractTextReader<String>
- Returns:
- the next amount of data, null if failed to read
-
-