Name
StreamHandler
Synopsis
This
Handler
subclass sends
log messages to an arbitrary java.io.OutputStream
.
It exists primarily to serve as the common superclass of
ConsoleHandler
, FileHandler
,
and SocketHandler
.
Figure 16-122. java.util.logging.StreamHandler
public class StreamHandler extends Handler { // Public Constructors public StreamHandler( ); public StreamHandler(java.io.OutputStream out, java.util.logging.Formatter formatter); // Public Methods Overriding Handler public void close( ) throws SecurityException; synchronized public void flush( ); synchronized public boolean isLoggable(LogRecord record); public void publish(LogRecord record); synchronized public void setEncoding(String encoding) throws SecurityException, java.io.UnsupportedEncodingException; // Protected Instance Methods protected void setOutputStream(java.io.OutputStream out) throws SecurityException; synchronized }
Subclasses
ConsoleHandler
, FileHandler
,
SocketHandler
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.