Class TextWriterAdapter
java.lang.Object
java.io.Writer
org.forgerock.audit.events.handlers.writers.TextWriterAdapter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
,TextWriter
Wraps a
TextWriter
in a Writer
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.forgerock.audit.events.handlers.writers.TextWriter
TextWriter.Stream
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
flush()
Flushes any buffered contents of the output stream.long
Retrieves the number of bytes written by this writer.void
shutdown()
Releases any resources held by the writer.void
write
(char[] cbuf) void
write
(char[] cbuf, int off, int len) void
write
(int c) void
Writes some text to the output stream.void
Methods inherited from class java.io.Writer
append, append, append, nullWriter
-
Constructor Details
-
TextWriterAdapter
Creates the writer.- Parameters:
delegate
- Delegate writer.
-
-
Method Details
-
write
- Specified by:
write
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
Description copied from interface:TextWriter
Writes some text to the output stream.- Specified by:
write
in interfaceTextWriter
- Overrides:
write
in classWriter
- Parameters:
str
- The text to write- Throws:
IOException
- If a problem occurs.
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
flush
Description copied from interface:TextWriter
Flushes any buffered contents of the output stream.- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in interfaceTextWriter
- Specified by:
flush
in classWriter
- Throws:
IOException
- If a problem occurs.
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
shutdown
public void shutdown()Description copied from interface:TextWriter
Releases any resources held by the writer.- Specified by:
shutdown
in interfaceTextWriter
-
getBytesWritten
public long getBytesWritten()Description copied from interface:TextWriter
Retrieves the number of bytes written by this writer.- Specified by:
getBytesWritten
in interfaceTextWriter
- Returns:
- the number of bytes written by this writer.
-