Package adams.gui.core
Class ConsolePanel.ConsolePanelOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- adams.gui.core.ConsolePanel.ConsolePanelOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Enclosing class:
- ConsolePanel
public static class ConsolePanel.ConsolePanelOutputStream extends OutputStream
For lettingPrintStreamobjects print to theConsolePanel.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected StringBuilderm_Bufferthe current buffer.protected LoggingLevelm_Levelthe level to use.
-
Constructor Summary
Constructors Constructor Description ConsolePanelOutputStream(LoggingLevel level)Initializes the output stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwrite(int b)Writes the specified byte to this output stream.-
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write, write
-
-
-
-
Field Detail
-
m_Level
protected LoggingLevel m_Level
the level to use.
-
m_Buffer
protected StringBuilder m_Buffer
the current buffer.
-
-
Constructor Detail
-
ConsolePanelOutputStream
public ConsolePanelOutputStream(LoggingLevel level)
Initializes the output stream.- Parameters:
level- the logging level
-
-
Method Detail
-
write
public void write(int b) throws IOExceptionWrites the specified byte to this output stream. The general contract forwriteis that one byte is written to the output stream. The byte to be written is the eight low-order bits of the argumentb. The 24 high-order bits ofbare ignored.Subclasses of
OutputStreammust provide an implementation for this method.- Specified by:
writein classOutputStream- Parameters:
b- thebyte.- Throws:
IOException
-
-