Top Description Fields Constructors Methods
org.glassfish.grizzly.http.server.accesslog

public Class StreamAppender

extends Object
implements AccessLogAppender
Class Inheritance
All Implemented Interfaces
org.glassfish.grizzly.http.server.accesslog.AccessLogAppender, java.io.Closeable, java.lang.AutoCloseable
Known Direct Subclasses
org.glassfish.grizzly.http.server.accesslog.FileAppender
Imports
java.io.IOException, .OutputStream, .OutputStreamWriter, .Writer, java.nio.charset.Charset

An appender writing log entries to an OutputStream.

Log entries will always encoded in UTF-8.

Authors
Pier Fumagalli, USRZ.com

Field Summary

Modifier and TypeField and Description
private static final String
private final Writer

Constructor Summary

AccessConstructor and Description
public
StreamAppender(OutputStream output)

Create a new StreamAppender instance writing log entries to the specified OutputStream.

Method Summary

Modifier and TypeMethod and Description
public void
append(String accessLogEntry)

Implements org.glassfish.grizzly.http.server.accesslog.AccessLogAppender.append.

Append the specified access log entry.

public void
close()

Implements org.glassfish.grizzly.http.server.accesslog.AccessLogAppender.close.

Close any underlying resource owned by this appender.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LINE_SEPARATORback to summary
private static final String LINE_SEPARATOR
writerback to summary
private final Writer writer

Constructor Detail

StreamAppenderback to summary
public StreamAppender(OutputStream output)

Create a new StreamAppender instance writing log entries to the specified OutputStream.

Method Detail

appendback to summary
public void append(String accessLogEntry) throws IOException

Implements org.glassfish.grizzly.http.server.accesslog.AccessLogAppender.append.

Doc from org.glassfish.grizzly.http.server.accesslog.AccessLogAppender.append.

Append the specified access log entry.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurred appending to the log.
closeback to summary
public void close() throws IOException

Implements org.glassfish.grizzly.http.server.accesslog.AccessLogAppender.close.

Doc from org.glassfish.grizzly.http.server.accesslog.AccessLogAppender.close.

Close any underlying resource owned by this appender.

Annotations
@Override
Exceptions
IOException:

Doc from java.io.Closeable.close.

if an I/O error occurs