Class AppendableWriter

java.lang.Object
java.io.Writer
org.apache.sis.io.AppendableWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

final class AppendableWriter extends Writer
Wraps a Appendable as a Writer.
Since:
0.3
Version:
0.3
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Appendable
    The underlying character output stream or buffer.

    Fields inherited from class java.io.Writer

    lock
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new filtered formatter which will send its output to the given stream or buffer.
  • Method Summary

    Modifier and Type
    Method
    Description
    append(char c)
    Forwards the given single character to out.
    append(CharSequence sequence)
    Forwards the given character sequence to out.
    append(CharSequence sequence, int start, int end)
    Forwards the given character sub-sequence to out.
    void
    If out implements Closeable, or is a Appender wrapper around a closeable object, delegates to that object.
    void
    If out implements Flushable, or is a Appender wrapper around a flushable object, delegates to that object.
    private static Object
    Returns the synchronization lock to use for writing to the given Appendable.
    Returns the content of the underlying Appendable as a string if possible, or the localized "Unavailable content" string otherwise.
    void
    write(char[] cbuf, int offset, int length)
    Forwards the given character array to out.
    void
    write(int c)
    Forwards the given single character to out.
    void
    write(String string)
    Forwards the given string to out.
    void
    write(String string, int start, int length)
    Forwards the given sub-string to out.

    Methods inherited from class java.io.Writer

    nullWriter, write

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • out

      private final Appendable out
      The underlying character output stream or buffer.
  • Constructor Details

    • AppendableWriter

      AppendableWriter(Appendable out)
      Creates a new filtered formatter which will send its output to the given stream or buffer.
      Parameters:
      out - the underlying character output stream or buffer.
  • Method Details