Package adams.data.io.output
Class AbstractNestedFlowWriter
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.io.output.AbstractFlowWriter
-
- adams.data.io.output.AbstractNestedFlowWriter
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,FileFormatHandler
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,FlowWriter
,NestedFlowWriter
,Serializable
- Direct Known Subclasses:
DefaultFlowWriter
public abstract class AbstractNestedFlowWriter extends AbstractFlowWriter implements NestedFlowWriter
Ancestor for flow writers that support the nested format.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adams.data.io.output.AbstractFlowWriter
AbstractFlowWriter.OutputType
-
-
Field Summary
-
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 AbstractNestedFlowWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
doWrite(List content, File file)
Performs the actual writing.protected boolean
doWrite(List content, OutputStream out)
Performs the actual writing.protected boolean
doWrite(List content, Writer writer)
Performs the actual writing.boolean
write(List content, File file)
Writes the given nested format to the specified file.boolean
write(List content, OutputStream stream)
Writes the nested format to the given output stream.boolean
write(List content, Writer writer)
Writes the nested format to the given writer.boolean
write(List content, String filename)
Writes the nested format to the given file.-
Methods inherited from class adams.data.io.output.AbstractFlowWriter
doWrite, doWrite, doWrite, getDefaultFormatExtension, getFormatDescription, getFormatExtensions, getOutputType, getWriters, write, write, write, write
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.io.FileFormatHandler
getDefaultFormatExtension, getFormatDescription, getFormatExtensions
-
Methods inherited from interface adams.data.io.output.FlowWriter
getCorrespondingReader, write, write, write, write
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
-
-
-
Method Detail
-
write
public boolean write(List content, File file)
Writes the given nested format to the specified file.- Specified by:
write
in interfaceNestedFlowWriter
- Parameters:
content
- the content to writefile
- the file to write to- Returns:
- true if successfully written
-
write
public boolean write(List content, String filename)
Writes the nested format to the given file.- Specified by:
write
in interfaceNestedFlowWriter
- Parameters:
content
- the content to writefilename
- the file to write the content to- Returns:
- true if successfully written
-
write
public boolean write(List content, OutputStream stream)
Writes the nested format to the given output stream. The caller must ensure that the stream gets closed.- Specified by:
write
in interfaceNestedFlowWriter
- Parameters:
content
- the content to writestream
- the output stream to write the content to- Returns:
- true if successfully written
-
write
public boolean write(List content, Writer writer)
Writes the nested format to the given writer. The caller must ensure that the writer gets closed.- Parameters:
content
- the content to writewriter
- the writer to write the content to- Returns:
- true if successfully written
-
doWrite
protected boolean doWrite(List content, File file)
Performs the actual writing. The caller must ensure that the writer gets closed.
Default implementation returns always false.- Parameters:
content
- the content to writefile
- the file to write the content to- Returns:
- true if successfully written
-
doWrite
protected boolean doWrite(List content, Writer writer)
Performs the actual writing. The caller must ensure that the writer gets closed.
Default implementation returns always false.- Parameters:
content
- the content to writewriter
- the writer to write the content to- Returns:
- true if successfully written
-
doWrite
protected boolean doWrite(List content, OutputStream out)
Performs the actual writing. The caller must ensure that the output stream gets closed.
Default implementation returns always false.- Parameters:
content
- the content to writeout
- the output stream to write the content to- Returns:
- true if successfully written
-
-