Class TextWriterAdapter
- java.lang.Object
-
- java.io.Writer
-
- org.forgerock.audit.events.handlers.writers.TextWriterAdapter
-
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable,TextWriter
public class TextWriterAdapter extends Writer implements TextWriter
Wraps aTextWriterin aWriter.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.forgerock.audit.events.handlers.writers.TextWriter
TextWriter.Stream
-
-
Constructor Summary
Constructors Constructor Description TextWriterAdapter(TextWriter delegate)Creates the writer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()Flushes any buffered contents of the output stream.longgetBytesWritten()Retrieves the number of bytes written by this writer.voidshutdown()Releases any resources held by the writer.voidwrite(char[] cbuf)voidwrite(char[] cbuf, int off, int len)voidwrite(int c)voidwrite(String str)Writes some text to the output stream.voidwrite(String str, int off, int len)-
Methods inherited from class java.io.Writer
append, append, append, nullWriter
-
-
-
-
Constructor Detail
-
TextWriterAdapter
public TextWriterAdapter(TextWriter delegate)
Creates the writer.- Parameters:
delegate- Delegate writer.
-
-
Method Detail
-
write
public void write(char[] cbuf, int off, int len) throws IOException- Specified by:
writein classWriter- Throws:
IOException
-
write
public void write(int c) throws IOException- Overrides:
writein classWriter- Throws:
IOException
-
write
public void write(char[] cbuf) throws IOException- Overrides:
writein classWriter- Throws:
IOException
-
write
public void write(String str) throws IOException
Description copied from interface:TextWriterWrites some text to the output stream.- Specified by:
writein interfaceTextWriter- Overrides:
writein classWriter- Parameters:
str- The text to write- Throws:
IOException- If a problem occurs.
-
write
public void write(String str, int off, int len) throws IOException
- Overrides:
writein classWriter- Throws:
IOException
-
flush
public void flush() throws IOExceptionDescription copied from interface:TextWriterFlushes any buffered contents of the output stream.- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceTextWriter- Specified by:
flushin classWriter- Throws:
IOException- If a problem occurs.
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
shutdown
public void shutdown()
Description copied from interface:TextWriterReleases any resources held by the writer.- Specified by:
shutdownin interfaceTextWriter
-
getBytesWritten
public long getBytesWritten()
Description copied from interface:TextWriterRetrieves the number of bytes written by this writer.- Specified by:
getBytesWrittenin interfaceTextWriter- Returns:
- the number of bytes written by this writer.
-
-