Package adams.data.io.input
Class AbstractCompressedTextReader
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.io.input.AbstractTextReader
-
- adams.data.io.input.AbstractCompressedTextReader
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
Bzip2TextFileReader
,GzippedTextFileReader
,LzfTextFileReader
,LzmaTextFileReader
,XzTextFileReader
,ZstdTextFileReader
public abstract class AbstractCompressedTextReader extends AbstractTextReader
Ancestor for text readers of compressed files.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractTextReader
m_TextReader
the reader for reading the decompressed content.-
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 AbstractCompressedTextReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected Object
doNext()
Returns the next lot of data.Class
generates()
Returns the class of the data that it returns.protected AbstractTextReader
getDefaultTextReader()
Returns the default text reader to use.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.AbstractTextReader
getTextReader()
Returns the reader.boolean
hasNext()
Returns whether more data is available.protected void
initialize()
Initializes the members.void
setTextReader(AbstractTextReader value)
Sets the reader.String
textReaderTipText()
Returns the tip text for this property.-
Methods inherited from class adams.data.io.input.AbstractTextReader
initialize, next, reset
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, 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_TextReader
protected AbstractTextReader m_TextReader
the reader for reading the decompressed content.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classAbstractOptionHandler
-
getDefaultTextReader
protected AbstractTextReader getDefaultTextReader()
Returns the default text reader to use.- Returns:
- the default
-
setTextReader
public void setTextReader(AbstractTextReader value)
Sets the reader.- Parameters:
value
- the reader
-
getTextReader
public AbstractTextReader getTextReader()
Returns the reader.- Returns:
- the reader
-
textReaderTipText
public String textReaderTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractTextReader
- Returns:
- null if no info available, otherwise short string
-
generates
public Class generates()
Returns the class of the data that it returns.- Specified by:
generates
in classAbstractTextReader
- Returns:
- the generated data type
-
hasNext
public boolean hasNext()
Returns whether more data is available.- Overrides:
hasNext
in classAbstractTextReader
- Returns:
- true if more data is available
-
doNext
protected Object doNext()
Returns the next lot of data.- Specified by:
doNext
in classAbstractTextReader
- Returns:
- the next amount of data, null if failed to read
-
-