gnu.mapping
Class LogWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.FilterWriter
          extended by gnu.mapping.LogWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable

public class LogWriter
extends java.io.FilterWriter

A class that supports an optional log file that output is duplicated to. This is used to implement the Scheme transcript facility.


Field Summary
 
Fields inherited from class java.io.FilterWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
LogWriter(java.io.Writer out)
           
 
Method Summary
 void close()
           
 void closeLogFile()
           
 void echo(char[] buf, int off, int len)
           
 void flush()
           
 java.io.Writer getLogFile()
           
 void setLogFile(java.lang.String name)
           
 void setLogFile(java.io.Writer log)
           
 void write(char[] buf, int off, int len)
           
 void write(int c)
           
 void write(java.lang.String str, int off, int len)
           
 
Methods inherited from class java.io.Writer
append, append, append, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogWriter

public LogWriter(java.io.Writer out)
Method Detail

getLogFile

public final java.io.Writer getLogFile()

setLogFile

public void setLogFile(java.io.Writer log)

setLogFile

public void setLogFile(java.lang.String name)
                throws java.io.IOException
Throws:
java.io.IOException

closeLogFile

public void closeLogFile()
                  throws java.io.IOException
Throws:
java.io.IOException

write

public void write(int c)
           throws java.io.IOException
Overrides:
write in class java.io.FilterWriter
Throws:
java.io.IOException

echo

public void echo(char[] buf,
                 int off,
                 int len)
          throws java.io.IOException
Throws:
java.io.IOException

write

public void write(char[] buf,
                  int off,
                  int len)
           throws java.io.IOException
Overrides:
write in class java.io.FilterWriter
Throws:
java.io.IOException

write

public void write(java.lang.String str,
                  int off,
                  int len)
           throws java.io.IOException
Overrides:
write in class java.io.FilterWriter
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.FilterWriter
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.FilterWriter
Throws:
java.io.IOException