com.realtime.crossfire.jxclient.util
Class DebugWriter

java.lang.Object
  extended by com.realtime.crossfire.jxclient.util.DebugWriter

public class DebugWriter
extends java.lang.Object

Writer debug information to a log file.


Field Summary
private  java.text.DateFormat simpleDateFormat
          A formatter for timestamps.
private  java.lang.Object sync
          The object for synchronizing messages.
private  java.io.Writer writer
          The Writer to write to.
 
Constructor Summary
DebugWriter(java.io.Writer writer)
          Creates a new instance.
 
Method Summary
 void debugProtocolWrite(java.lang.CharSequence str)
          Writes a message to the debug protocol.
 void debugProtocolWrite(java.lang.CharSequence str, java.lang.Throwable throwable)
          Writes a message to the debug protocol including a throwable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

simpleDateFormat

@NotNull
private final java.text.DateFormat simpleDateFormat
A formatter for timestamps.


sync

@NotNull
private final java.lang.Object sync
The object for synchronizing messages.


writer

@NotNull
private final java.io.Writer writer
The Writer to write to.

Constructor Detail

DebugWriter

public DebugWriter(@NotNull
                   java.io.Writer writer)
Creates a new instance.

Parameters:
writer - the writer to write to
Method Detail

debugProtocolWrite

public void debugProtocolWrite(@NotNull
                               java.lang.CharSequence str)
Writes a message to the debug protocol.

Parameters:
str - the message to write

debugProtocolWrite

public void debugProtocolWrite(@NotNull
                               java.lang.CharSequence str,
                               @NotNull
                               java.lang.Throwable throwable)
Writes a message to the debug protocol including a throwable.

Parameters:
str - the message to write
throwable - the throwable to log