Package org.opends.server.loggers
Interface TextWriter
-
public interface TextWriter
A TextWriter provides a character-based stream used by a Text Publishers as a target for outputting log records.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description void
flush()
Flushes any buffered contents of the output stream.long
getBytesWritten()
Retrieves the number of bytes written by this writer.static TextWriter
of(OutputStream outputStream)
Returns a new text writer for the provided output stream.void
shutdown()
Releases any resources held by the writer.void
writeRecord(String record)
Writes a text record to the output stream.
-
-
-
Method Detail
-
writeRecord
void writeRecord(String record)
Writes a text record to the output stream.- Parameters:
record
- The record to write.
-
flush
void flush()
Flushes any buffered contents of the output stream.
-
shutdown
void shutdown()
Releases any resources held by the writer.
-
getBytesWritten
long getBytesWritten()
Retrieves the number of bytes written by this writer.- Returns:
- the number of bytes written by this writer.
-
of
static TextWriter of(OutputStream outputStream)
Returns a new text writer for the provided output stream.- Parameters:
outputStream
- The output stream.- Returns:
- The new text writer.
-
-