Package adams.data.io.output
Interface SpreadSheetWriter
-
- All Superinterfaces:
Destroyable
,OptionHandler
,Stoppable
,StoppableWithFeedback
- All Known Subinterfaces:
IncrementalSpreadSheetWriter
,MultiSheetSpreadSheetWriter
,NoHeaderSpreadSheetWriter
- All Known Implementing Classes:
AbstractFormattedSpreadSheetWriter
,AbstractMultiSheetFormattedSpreadSheetWriter
,AbstractMultiSheetSpreadSheetWriter
,AbstractMultiSheetSpreadSheetWriterWithMissingValueSupport
,AbstractSpreadSheetWriter
,AbstractSpreadSheetWriterWithMissingValueSupport
,AbstractWekaSpreadSheetWriter
,AccessSpreadSheetWriter
,ArffSpreadSheetWriter
,AutoWidthTabularSpreadSheetWriter
,CsvSpreadSheetWriter
,ExcelSpreadSheetWriter
,ExcelStreamingSpreadSheetWriter
,FixedTabularSpreadSheetWriter
,GnumericSpreadSheetWriter
,JSONSpreadSheetWriter
,LibSVMSpreadSheetWriter
,Mat5SpreadSheetWriter
,MatlabSpreadSheetWriter
,ODFSpreadSheetWriter
,PropertiesSpreadSheetWriter
,SimpleArffSpreadSheetWriter
,SimpleStreamSpreadSheetWriter
,SqlDumpSpreadSheetWriter
,SVMLightSpreadSheetWriter
,TsvSpreadSheetWriter
,XrffSpreadSheetWriter
public interface SpreadSheetWriter extends OptionHandler, StoppableWithFeedback
Interface for spreadsheet writers.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SpreadSheetReader
getCorrespondingReader()
Returns, if available, the corresponding reader.String
getFormatDescription()
Returns a string describing the format (used in the file chooser).String[]
getFormatExtensions()
Returns the extension(s) of the format.void
reset()
Resets the writer.boolean
write(SpreadSheet content, File file)
Writes the given content to the specified file.boolean
write(SpreadSheet content, OutputStream stream)
Writes the spreadsheet to the given output stream.boolean
write(SpreadSheet content, Writer writer)
Writes the spreadsheet to the given writer.boolean
write(SpreadSheet content, String filename)
Writes the spreadsheet to the given file.-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
Methods inherited from interface adams.core.Stoppable
stopExecution
-
Methods inherited from interface adams.core.StoppableWithFeedback
isStopped
-
-
-
-
Method Detail
-
getFormatDescription
String getFormatDescription()
Returns a string describing the format (used in the file chooser).- Returns:
- a description suitable for displaying in the file chooser
-
getFormatExtensions
String[] getFormatExtensions()
Returns the extension(s) of the format.- Returns:
- the extension (without the dot!)
-
getCorrespondingReader
SpreadSheetReader getCorrespondingReader()
Returns, if available, the corresponding reader.- Returns:
- the reader, null if none available
-
reset
void reset()
Resets the writer.
-
write
boolean write(SpreadSheet content, File file)
Writes the given content to the specified file.- Parameters:
content
- the content to writefile
- the file to write to- Returns:
- true if successfully written
-
write
boolean write(SpreadSheet content, String filename)
Writes the spreadsheet to the given file.- Parameters:
content
- the spreadsheet to writefilename
- the file to write the spreadsheet to- Returns:
- true if successfully written
-
write
boolean write(SpreadSheet content, OutputStream stream)
Writes the spreadsheet to the given output stream. The caller must ensure that the stream gets closed.- Parameters:
content
- the spreadsheet to writestream
- the output stream to write the spreadsheet to- Returns:
- true if successfully written
-
write
boolean write(SpreadSheet content, Writer writer)
Writes the spreadsheet to the given writer. The caller must ensure that the writer gets closed.- Parameters:
content
- the spreadsheet to writewriter
- the writer to write the spreadsheet to- Returns:
- true if successfully written
-
-