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 AbstractTextReaderm_TextReaderthe 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 voiddefineOptions()Adds options to the internal list of options.protected ObjectdoNext()Returns the next lot of data.Classgenerates()Returns the class of the data that it returns.protected AbstractTextReadergetDefaultTextReader()Returns the default text reader to use.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.AbstractTextReadergetTextReader()Returns the reader.booleanhasNext()Returns whether more data is available.protected voidinitialize()Initializes the members.voidsetTextReader(AbstractTextReader value)Sets the reader.StringtextReaderTipText()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:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein 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:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin 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:
generatesin classAbstractTextReader- Returns:
- the generated data type
-
hasNext
public boolean hasNext()
Returns whether more data is available.- Overrides:
hasNextin classAbstractTextReader- Returns:
- true if more data is available
-
doNext
protected Object doNext()
Returns the next lot of data.- Specified by:
doNextin classAbstractTextReader- Returns:
- the next amount of data, null if failed to read
-
-