public class PropertyDataLogger
extends java.lang.Object
implements java.beans.PropertyChangeListener
Modifier and Type | Field and Description |
---|---|
private int |
current
The current number of values on the current line.
|
private java.lang.String |
delimiter
The delimiter to place between values on the same line.
|
private static java.util.logging.Logger |
logger |
private int |
numberPerLine
The number of values to write per line.
|
private java.io.BufferedWriter |
output
The output Writer associated with the OutputStream.
|
protected java.lang.String |
propertyName
The name of the property to log.
|
Constructor and Description |
---|
PropertyDataLogger(java.lang.String name,
java.io.File outputFile) |
PropertyDataLogger(java.lang.String name,
java.io.OutputStream outputStream)
Creates new PropertyDataLogger
|
Modifier and Type | Method and Description |
---|---|
void |
closeOutput()
Closes the OutputStream.
|
int |
getCurrent() |
java.lang.String |
getDelimiter() |
int |
getNumberPerLine() |
java.lang.String |
getPropertyName() |
void |
propertyChange(java.beans.PropertyChangeEvent e)
If the PropertyChangeEvent is for the desired property,
writes the value to the OutputStream.
|
void |
setDelimiter(java.lang.String delimiter) |
void |
setNumberPerLine(int numberPerLine) |
private static final java.util.logging.Logger logger
private java.io.BufferedWriter output
protected java.lang.String propertyName
private int numberPerLine
private int current
private java.lang.String delimiter
public PropertyDataLogger(java.lang.String name, java.io.OutputStream outputStream)
name
- The name of the property to log.outputStream
- The OutputStream to write the log to.public PropertyDataLogger(java.lang.String name, java.io.File outputFile)
public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange
in interface java.beans.PropertyChangeListener
public void closeOutput()
public java.lang.String getPropertyName()
public int getNumberPerLine()
public void setNumberPerLine(int numberPerLine)
public int getCurrent()
public java.lang.String getDelimiter()
public void setDelimiter(java.lang.String delimiter)