Package adams.flow.transformer.audiodata
Class AbstractAudioDataReader<T extends AbstractAudioContainer>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.audiodata.AbstractAudioDataReader<T>
-
- Type Parameters:
T
- the output type
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.SizeOfHandler
,Serializable
- Direct Known Subclasses:
Wave
public abstract class AbstractAudioDataReader<T extends AbstractAudioContainer> extends adams.core.option.AbstractOptionHandler
Ancestor for readers for audio data.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractAudioDataReader()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Class[]
accepts()
The accepted input types.protected String
check(Object input)
Performs checks before reading from the input.protected abstract T
doRead(Object input)
Reads the data from the input.abstract Class
generates()
The output generated by the reader.T
read(Object input)
Reads the data from the input.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
accepts
public abstract Class[] accepts()
The accepted input types.- Returns:
- the input types
-
generates
public abstract Class generates()
The output generated by the reader.- Returns:
- the output type
-
check
protected String check(Object input)
Performs checks before reading from the input.- Parameters:
input
- the input to read- Returns:
- null if successful, otherwise error message
-
doRead
protected abstract T doRead(Object input) throws Exception
Reads the data from the input.- Parameters:
input
- the input data- Returns:
- the generated output
- Throws:
Exception
- if reading fails
-
-