Class Log
java.lang.Object
dataAnalysis.Log
- All Implemented Interfaces:
AutoCloseable
This class creates a file with a getLog of strings. Do not worry about
performance, it uses a buffered writer. Remember to close the Log!
- Author:
- federico
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Log
-
Log
Creates a new instance of Log- Parameters:
logName- name of getLog filebufDim- dimension of buffer of chars
-
-
Method Details
-
write
public void write(double newSample) writes a a double in a new line: it is very useful to write logs in matlab format. you can add comments with write(String str), if the text is preceded by %.- Parameters:
newSample- the new sample to be written
-
write
-
comment
writes a comment in the getLog file with the standard Matlab format %- Parameters:
com- the comment
-
close
public void close()it closes the getLog. Important you must close the getLog before closing the application, otherwise the file of getLog will be void.- Specified by:
closein interfaceAutoCloseable
-