Package me.autobot.lib.telemetry
Class SysoutMiddleman.Sysout
java.lang.Object
java.io.OutputStream
me.autobot.lib.telemetry.SysoutMiddleman.Sysout
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Enclosing class:
- SysoutMiddleman
Sysout messages.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Listener for messages. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(SysoutMiddleman.Sysout.Listener listener) Adds a listener to the sysout.static SysoutMiddleman.Sysout
getError()
Gets the error sysout.static SysoutMiddleman.Sysout
getOut()
Gets the output sysout.int
getType()
Gets the type of message.void
Removes a listener from the sysout.void
write
(int b) Writes a byte to the output stream.Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write, write
-
Constructor Details
-
Sysout
Creates a new Sysout object.- Parameters:
original
- The original PrintStream.type
- The type of message. 0 for System.out, 1 for System.err.
-
-
Method Details
-
getError
Gets the error sysout.- Returns:
- The error sysout.
-
getOut
Gets the output sysout.- Returns:
- The output sysout.
-
write
public void write(int b) Writes a byte to the output stream.- Specified by:
write
in classOutputStream
- Parameters:
b
- The byte to write.
-
getType
public int getType()Gets the type of message.- Returns:
- The type of message.
-
addListener
Adds a listener to the sysout.- Parameters:
listener
- The listener to add.
-
removeListener
Removes a listener from the sysout.- Parameters:
listener
- The listener to remove.
-