public class CSVLogger extends AbstractLogger
closed, record, schema
Constructor and Description |
---|
CSVLogger(java.lang.String[] schema)
Creates a logger with the specified schema, and
log.csv as default filename, tab as default separator.
|
CSVLogger(java.lang.String[] schema,
java.lang.String filename)
Creates a logger with the specified schema and filename, tab as default separator.
|
CSVLogger(java.lang.String[] schema,
java.lang.String filename,
java.lang.String separator)
Creates a logger with the specified schema, filename and separator.
|
CSVLogger(java.lang.String[] schema,
java.lang.String filename,
java.lang.String separator,
boolean header)
Creates a logger with the specified schema, filename and separator.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doClose()
Closes the logger.
|
protected void |
doSave()
Saves cached records on media
|
java.io.PrintWriter |
getOut()
Return the output stream used for logging.
|
protected void |
store()
Stores the current record.
|
close, finalize, get, getFields, getSchema, isRecordComplete, log, put, save
public CSVLogger(java.lang.String[] schema) throws java.io.FileNotFoundException
schema
- - the array making the schema of recordsjava.io.FileNotFoundException
public CSVLogger(java.lang.String[] schema, java.lang.String filename) throws java.io.FileNotFoundException
schema
- - the array making the schema of recordsfilename
- - the output filenamejava.io.FileNotFoundException
public CSVLogger(java.lang.String[] schema, java.lang.String filename, java.lang.String separator) throws java.io.FileNotFoundException
schema
- - the array making the schema of recordsfilename
- - the output filenameseparator
- - the values separatorjava.io.FileNotFoundException
public CSVLogger(java.lang.String[] schema, java.lang.String filename, java.lang.String separator, boolean header) throws java.io.FileNotFoundException
schema
- - the array making the schema of recordsfilename
- - the output filenameseparator
- - the values separatorheader
- - the header is included if true, otherwise not.java.io.FileNotFoundException
public java.io.PrintWriter getOut()
protected void store()
AbstractLogger
store
in class AbstractLogger
protected void doSave()
AbstractLogger
doSave
in class AbstractLogger
protected void doClose()
AbstractLogger
doClose
in class AbstractLogger