Class StreamAppender
- java.lang.Object
-
- org.glassfish.grizzly.http.server.accesslog.StreamAppender
-
- All Implemented Interfaces:
Closeable,AutoCloseable,AccessLogAppender
- Direct Known Subclasses:
FileAppender
public class StreamAppender extends Object implements AccessLogAppender
- Author:
- Pier Fumagalli, USRZ.com
-
-
Constructor Summary
Constructors Constructor Description StreamAppender(OutputStream output)Create a newStreamAppenderinstance writing log entries to the specifiedOutputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappend(String accessLogEntry)Append the specified access log entry.voidclose()Close any underlying resource owned by this appender.
-
-
-
Constructor Detail
-
StreamAppender
public StreamAppender(OutputStream output)
Create a newStreamAppenderinstance writing log entries to the specifiedOutputStream.
-
-
Method Detail
-
append
public void append(String accessLogEntry) throws IOException
Description copied from interface:AccessLogAppenderAppend the specified access log entry.- Specified by:
appendin interfaceAccessLogAppender- Parameters:
accessLogEntry- TheStringvalue of the data to be append in the access log.- Throws:
IOException- If an I/O error occurred appending to the log.
-
close
public void close() throws IOExceptionDescription copied from interface:AccessLogAppenderClose any underlying resource owned by this appender.- Specified by:
closein interfaceAccessLogAppender- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-