edu.stanford.nlp.util.logging
Class RedwoodPrintStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by java.io.PrintStream
              extended by edu.stanford.nlp.util.logging.RedwoodPrintStream
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class RedwoodPrintStream
extends PrintStream

A PrintStream that writes to Redwood logs. The primary use of this class is to override System.out and System.err.

Author:
Gabor Angeli (angeli at cs.stanford)

Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
RedwoodPrintStream(Redwood.Flag tag, PrintStream realStream)
           
 
Method Summary
 PrintStream append(char c)
           
 PrintStream append(CharSequence charSequence)
           
 PrintStream append(CharSequence charSequence, int i, int i1)
           
 boolean checkError()
           
protected  void clearError()
           
 void close()
           
 void flush()
           
 PrintStream format(Locale locale, String s, Object... objects)
           
 PrintStream format(String s, Object... objects)
           
 void print(boolean b)
           
 void print(char c)
           
 void print(char[] chars)
           
 void print(double d)
           
 void print(float f)
           
 void print(int i)
           
 void print(long l)
           
 void print(Object o)
           
 void print(String s)
           
 PrintStream printf(Locale locale, String s, Object... objects)
           
 PrintStream printf(String s, Object... objects)
           
 void println()
           
 void println(boolean b)
           
 void println(char c)
           
 void println(char[] chars)
           
 void println(double d)
           
 void println(float f)
           
 void println(int i)
           
 void println(long l)
           
 void println(Object o)
           
 void println(String s)
           
protected  void setError()
           
 void write(byte[] bytes)
           
 void write(byte[] bytes, int i, int i1)
           
 void write(int i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RedwoodPrintStream

public RedwoodPrintStream(Redwood.Flag tag,
                          PrintStream realStream)
Method Detail

flush

public void flush()
Specified by:
flush in interface Flushable
Overrides:
flush in class PrintStream

close

public void close()
Specified by:
close in interface Closeable
Overrides:
close in class PrintStream

checkError

public boolean checkError()
Overrides:
checkError in class PrintStream

setError

protected void setError()
Overrides:
setError in class PrintStream

clearError

protected void clearError()
Overrides:
clearError in class PrintStream

write

public void write(byte[] bytes)
           throws IOException
Overrides:
write in class FilterOutputStream
Throws:
IOException

write

public void write(int i)
Overrides:
write in class PrintStream

write

public void write(byte[] bytes,
                  int i,
                  int i1)
Overrides:
write in class PrintStream

print

public void print(boolean b)
Overrides:
print in class PrintStream

print

public void print(char c)
Overrides:
print in class PrintStream

print

public void print(int i)
Overrides:
print in class PrintStream

print

public void print(long l)
Overrides:
print in class PrintStream

print

public void print(float f)
Overrides:
print in class PrintStream

print

public void print(double d)
Overrides:
print in class PrintStream

print

public void print(char[] chars)
Overrides:
print in class PrintStream

print

public void print(String s)
Overrides:
print in class PrintStream

print

public void print(Object o)
Overrides:
print in class PrintStream

println

public void println(boolean b)
Overrides:
println in class PrintStream

println

public void println(char c)
Overrides:
println in class PrintStream

println

public void println(int i)
Overrides:
println in class PrintStream

println

public void println(long l)
Overrides:
println in class PrintStream

println

public void println(float f)
Overrides:
println in class PrintStream

println

public void println(double d)
Overrides:
println in class PrintStream

println

public void println(char[] chars)
Overrides:
println in class PrintStream

println

public void println(String s)
Overrides:
println in class PrintStream

println

public void println(Object o)
Overrides:
println in class PrintStream

println

public void println()
Overrides:
println in class PrintStream

printf

public PrintStream printf(String s,
                          Object... objects)
Overrides:
printf in class PrintStream

printf

public PrintStream printf(Locale locale,
                          String s,
                          Object... objects)
Overrides:
printf in class PrintStream

format

public PrintStream format(String s,
                          Object... objects)
Overrides:
format in class PrintStream

format

public PrintStream format(Locale locale,
                          String s,
                          Object... objects)
Overrides:
format in class PrintStream

append

public PrintStream append(CharSequence charSequence)
Specified by:
append in interface Appendable
Overrides:
append in class PrintStream

append

public PrintStream append(CharSequence charSequence,
                          int i,
                          int i1)
Specified by:
append in interface Appendable
Overrides:
append in class PrintStream

append

public PrintStream append(char c)
Specified by:
append in interface Appendable
Overrides:
append in class PrintStream


Stanford NLP Group