Closeable, Flushable, AutoCloseable, FlushableCloseable, ProtectableConsoleHandler, FileHandlerpublic class OutputStreamHandler extends WriterHandler
OutputStream, using the specified encoding. If no encoding is
specified, the platform default is used.handlers, handlersUpdateroutputLock| Constructor | Description |
|---|---|
OutputStreamHandler() |
Construct a new instance with no formatter.
|
OutputStreamHandler(OutputStream outputStream,
Formatter formatter) |
Construct a new instance.
|
OutputStreamHandler(Formatter formatter) |
Construct a new instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
String |
getEncoding() |
Get the target encoding.
|
void |
setEncoding(String encoding) |
Set the target encoding.
|
void |
setOutputStream(OutputStream outputStream) |
Set the output stream to write to.
|
void |
setWriter(Writer writer) |
Set the writer.
|
addHandler, checkAccess, checkAccess, clearHandlers, disableAccess, enableAccess, getHandlers, isAutoFlush, isCallerCalculationRequired, isCloseChildren, isEnabled, protect, publish, publish, removeHandler, setAutoFlush, setCloseChildren, setEnabled, setErrorManager, setFilter, setFormatter, setHandlers, setLevel, unprotectgetErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportErrorpublic OutputStreamHandler()
public OutputStreamHandler(Formatter formatter)
formatter - the formatter to usepublic OutputStreamHandler(OutputStream outputStream, Formatter formatter)
outputStream - the output stream to useformatter - the formatter to usepublic String getEncoding()
getEncoding in class Handlernull if the platform default is being usedpublic void setEncoding(String encoding) throws SecurityException, UnsupportedEncodingException
setEncoding in class ExtHandlerencoding - the new encodingSecurityException - if you do not have sufficient permission to invoke this operationUnsupportedEncodingException - if the specified encoding is not supportedpublic void setWriter(Writer writer)
setWriter in class WriterHandlerwriter - the new writer, or null to disable loggingpublic void setOutputStream(OutputStream outputStream)
outputStream - the new output stream or null for noneCopyright © 2020 JBoss by Red Hat. All rights reserved.