org.omegahat.Simulation.MCMC.Listeners
Class ListenerWriter
java.lang.Object
|
+--org.omegahat.Simulation.MCMC.Listeners.ListenerWriter
- All Implemented Interfaces:
- MCMCListener, MCMCListenerWriter
- Direct Known Subclasses:
- ListenerGzipWriter, PosteriorProbWriter, StrippedListenerWriter
- public class ListenerWriter
- extends java.lang.Object
- implements MCMCListenerWriter
Field Summary |
protected java.io.PrintWriter |
out
|
protected boolean |
storeTime
|
Method Summary |
void |
close()
Write out any cached state and then close the output stream. |
protected void |
finalize()
Closes the stream when garbage is collected. |
void |
flush()
Write out any cached state |
void |
notify(MCMCEvent e)
Function to be called for notification |
void |
print(java.lang.String data)
Write arbitrary text to the output stream. |
void |
println(java.lang.String data)
Write arbitrary text to the output stream. |
Methods inherited from class java.lang.Object |
, clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
out
protected java.io.PrintWriter out
storeTime
protected boolean storeTime
ListenerWriter
public ListenerWriter(java.lang.String filename,
boolean append,
boolean storeTime)
throws java.io.IOException
ListenerWriter
public ListenerWriter(java.lang.String filename,
boolean append)
throws java.io.IOException
ListenerWriter
public ListenerWriter(java.lang.String filename)
throws java.io.IOException
ListenerWriter
protected ListenerWriter()
notify
public void notify(MCMCEvent e)
- Description copied from interface:
MCMCListener
- Function to be called for notification
- Specified by:
notify
in interface MCMCListener
flush
public void flush()
- Description copied from interface:
MCMCListenerWriter
- Write out any cached state
- Specified by:
flush
in interface MCMCListenerWriter
close
public void close()
- Description copied from interface:
MCMCListenerWriter
- Write out any cached state and then close the output stream.
- Specified by:
close
in interface MCMCListenerWriter
finalize
protected void finalize()
throws java.lang.Throwable
- Closes the stream when garbage is collected.
Checks the file descriptor first to make sure it is not already closed.
- Overrides:
finalize
in class java.lang.Object
println
public void println(java.lang.String data)
- Description copied from interface:
MCMCListenerWriter
- Write arbitrary text to the output stream.
- Specified by:
println
in interface MCMCListenerWriter
print
public void print(java.lang.String data)
- Description copied from interface:
MCMCListenerWriter
- Write arbitrary text to the output stream.
- Specified by:
print
in interface MCMCListenerWriter