edu.umd.cfar.lamp.apploader.misc
Class TargetedPrintStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.PrintStream
edu.umd.cfar.lamp.apploader.misc.TargetedPrintStream
- public class TargetedPrintStream
- extends java.io.PrintStream
A printstream to a file. This is designed to redirect
the system streams to a file, while still printing out
the system stream to the console.
Fields inherited from class java.io.FilterOutputStream |
out |
Constructor Summary |
TargetedPrintStream(java.io.PrintStream original,
java.io.OutputStream out)
Constructs a new two-target output stream. |
TargetedPrintStream(java.io.PrintStream original,
java.io.OutputStream out,
boolean autoFlush)
Constructs a new two-target output stream. |
TargetedPrintStream(java.io.PrintStream original,
java.io.OutputStream out,
boolean autoFlush,
java.lang.String encoding)
|
Methods inherited from class java.io.PrintStream |
setError |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
TargetedPrintStream
public TargetedPrintStream(java.io.PrintStream original,
java.io.OutputStream out)
- Constructs a new two-target output stream.
- Parameters:
original
- the original streamout
- the secondary stream
TargetedPrintStream
public TargetedPrintStream(java.io.PrintStream original,
java.io.OutputStream out,
boolean autoFlush)
- Constructs a new two-target output stream.
- Parameters:
original
- the original streamout
- the secondary streamautoFlush
- sets the autoflush option on the secondary stream
TargetedPrintStream
public TargetedPrintStream(java.io.PrintStream original,
java.io.OutputStream out,
boolean autoFlush,
java.lang.String encoding)
throws java.io.UnsupportedEncodingException
- Parameters:
original
- the original output streamout
- where to send outputautoFlush
- to flush the buffer after every write method callencoding
- a supported character encoding
- Throws:
java.io.UnsupportedEncodingException
checkError
public boolean checkError()
close
public void close()
equals
public boolean equals(java.lang.Object arg0)
flush
public void flush()
hashCode
public int hashCode()
print
public void print(boolean arg0)
print
public void print(char arg0)
print
public void print(char[] arg0)
print
public void print(double arg0)
print
public void print(float arg0)
print
public void print(int arg0)
print
public void print(java.lang.Object arg0)
print
public void print(java.lang.String arg0)
print
public void print(long arg0)
println
public void println()
println
public void println(boolean arg0)
println
public void println(char arg0)
println
public void println(char[] arg0)
println
public void println(double arg0)
println
public void println(float arg0)
println
public void println(int arg0)
println
public void println(java.lang.Object arg0)
println
public void println(java.lang.String arg0)
println
public void println(long arg0)
write
public void write(byte[] arg0)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(byte[] arg0,
int arg1,
int arg2)
write
public void write(int arg0)
getOriginal
public java.io.PrintStream getOriginal()
- Gets the original stream.
- Returns: