Class Interceptor
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.PrintStream
nz.ac.vuw.ecs.swen225.gp6.persistency.Interceptor
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
Class for intercepting System.out calls. Handles the output streams and redirects all outputs to:
1. Normal output
2. In-game log panel display
3. Log file in /res
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.PrintStream
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, printf, println, println, println, println, println, println, println, println, println, setError, write, write, write, writeBytesMethods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
Interceptor
Constructor for the Interceptor class.- Parameters:
out- The output stream
-
-
Method Details
-
print
Print a string to the output stream.- Overrides:
printin classPrintStream- Parameters:
s- The string to print
-
println
Print a line to the output stream.- Overrides:
printlnin classPrintStream- Parameters:
s- The string to print
-
printf
Print a format string to the output stream.- Overrides:
printfin classPrintStream- Parameters:
format- The format stringargs- The arguments
-