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 lettingPrintStream
objects print to theConsolePanel
.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected StringBuilder
m_Buffer
the current buffer.protected LoggingLevel
m_Level
the 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 void
write(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 IOException
Writes the specified byte to this output stream. The general contract forwrite
is 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 ofb
are ignored.Subclasses of
OutputStream
must provide an implementation for this method.- Specified by:
write
in classOutputStream
- Parameters:
b
- thebyte
.- Throws:
IOException
-
-