System.out by default.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| public static enum | ConsoleHandler.
The target stream type. |
| Modifier and Type | Field and Description |
|---|---|
| private static final OutputStream | |
| private static final String | |
| private final ErrorManager | |
| private static final OutputStream |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | ConsoleHandler(final ConsoleHandler.
the target to write to, or targetnull to start with an uninitialized targetConstruct a new instance. |
| public | ConsoleHandler(final ConsoleHandler.
the target to write to, or target,null to start with an uninitialized targetthe formatter to use formatter)Construct a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| private static ConsoleHandler. | |
| public ErrorManager | |
| public static boolean | Returns: true if there is a console, false otherwiseDetermine whether the console exists. |
| public static boolean | Returns: true if the console exists and supports graphical output; false otherwise or if
graphical support cannot be passively detectedDetermine whether the console can be passively detected to support graphical output. |
| public static boolean | Returns: true if the console exists and supports truecolor output; false otherwiseDetermine whether the console supports truecolor output. |
| public void | setErrorManager(final ErrorManager
the new ErrorManager em)Overrides org. Define an ErrorManager for this Handler. |
| public void | setOutputStream(final OutputStream
the new output stream or outputStream)null for noneOverrides org. Set the output stream to write to. |
| public void | setTarget(ConsoleHandler.
the target to write to, or targetnull to clear the targetSet the target for this console handler. |
| private static OutputStream | |
| private static Writer | |
| public boolean | Returns: true if the image was written, or false if image support isn't foundthe PNG image data stream to write (must not be imageData, int null)the number of text columns to occupy (0 for automatic) columns, int the number of text rows to occupy (0 for automatic) rows)Write a PNG image to the console log, if it is supported. |
| err | back to summary |
|---|---|
| private static final OutputStream err | |
| ESC | back to summary |
|---|---|
| private static final String ESC | |
| localErrorManager | back to summary |
|---|---|
| private final ErrorManager localErrorManager | |
| out | back to summary |
|---|---|
| private static final OutputStream out | |
| ConsoleHandler | back to summary |
|---|---|
| public ConsoleHandler() Construct a new instance. | |
| ConsoleHandler | back to summary |
|---|---|
| public ConsoleHandler(final Formatter formatter) Construct a new instance.
| |
| ConsoleHandler | back to summary |
|---|---|
| public ConsoleHandler(final ConsoleHandler. Construct a new instance.
| |
| ConsoleHandler | back to summary |
|---|---|
| public ConsoleHandler(final ConsoleHandler. Construct a new instance.
| |
| defaultTarget | back to summary |
|---|---|
| private static ConsoleHandler. | |
| getLocalErrorManager | back to summary |
|---|---|
| public ErrorManager getLocalErrorManager() Get the local error manager. This is an error manager that will publish errors to this console handler. The console handler itself should not use this error manager.
| |
| hasConsole | back to summary |
|---|---|
| public static boolean hasConsole() Determine whether the console exists.
If the console does not exist, then the standard output stream will be used when
| |
| isGraphicsSupportPassivelyDetected | back to summary |
|---|---|
| public static boolean isGraphicsSupportPassivelyDetected() Determine whether the console can be passively detected to support graphical output. This call may be expensive, so the result should be captured for the lifetime of any formatter making use of this information.
| |
| isTrueColor | back to summary |
|---|---|
| public static boolean isTrueColor() Determine whether the console supports truecolor output. This call may be expensive, so the result should be captured for the lifetime of any formatter making use of this information.
| |
| setErrorManager | back to summary |
|---|---|
| public void setErrorManager(final ErrorManager em) Overrides org. Doc from java. Define an ErrorManager for this Handler. The ErrorManager's "error" method will be invoked if any errors occur while using this Handler.
| |
| setOutputStream | back to summary |
|---|---|
| public void setOutputStream(final OutputStream outputStream) Overrides org. Doc from org. Set the output stream to write to. The output stream will then belong to this handler; when the handler is closed or a new writer or output stream is set, this output stream will be closed.
| |
| setTarget | back to summary |
|---|---|
| public void setTarget(ConsoleHandler. Set the target for this console handler.
| |
| wrap | back to summary |
|---|---|
| private static OutputStream wrap(final OutputStream outputStream) | |
| wrap | back to summary |
|---|---|
| private static Writer wrap(final Writer writer) | |
| writeImagePng | back to summary |
|---|---|
| public boolean writeImagePng(InputStream imageData, int columns, int rows) throws IOException Write a PNG image to the console log, if it is supported. The image data stream must be closed by the caller.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final PrintWriter |
| Access | Constructor and Description |
|---|---|
| private |
| console | back to summary |
|---|---|
| private static final PrintWriter console | |
| ConsoleHolder | back to summary |
|---|---|
| private ConsoleHolder() | |
| Modifier and Type | Field and Description |
|---|---|
| public static final ConsoleHandler. | CONSOLE
The target for |
| public static final ConsoleHandler. | SYSTEM_ERR
The target for |
| public static final ConsoleHandler. | SYSTEM_OUT
The target for |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ConsoleHandler. | |
| public static ConsoleHandler. |
| CONSOLE | back to summary |
|---|---|
| public static final ConsoleHandler. The target for | |
| SYSTEM_ERR | back to summary |
|---|---|
| public static final ConsoleHandler. The target for | |
| SYSTEM_OUT | back to summary |
|---|---|
| public static final ConsoleHandler. The target for | |
| Target | back to summary |
|---|---|
| private Target() | |
| valueOf | back to summary |
|---|---|
| public static ConsoleHandler. | |
| values | back to summary |
|---|---|
| public static ConsoleHandler. | |