groovy.io

## Class EncodingAwareBufferedWriter

- java.lang.Object
- - java.io.Writer
  - - java.io.BufferedWriter
    - - groovy.io.EncodingAwareBufferedWriter

- All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.Appendable, java.lang.AutoCloseable

      public class EncodingAwareBufferedWriter
      extends java.io.BufferedWriter

  A buffered writer only for OutputStreamWriter that is aware of the encoding of the OutputStreamWriter.
  Author:
    Paul King

- - ### Field Summary

    - ### Fields inherited from class java.io.Writer

      `lock`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EncodingAwareBufferedWriter(java.io.OutputStreamWriter out)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getEncoding()` The encoding as returned by the underlying OutputStreamWriter.
    `java.lang.String` | `getNormalizedEncoding()` The encoding as returned by the underlying OutputStreamWriter.

    - ### Methods inherited from class java.io.BufferedWriter

      `close, flush, newLine, write, write, write`

    - ### Methods inherited from class java.io.Writer

      `append, append, append, write, write`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EncodingAwareBufferedWriter

          public EncodingAwareBufferedWriter(java.io.OutputStreamWriter out)

  - ### Method Detail

    - #### getEncoding

          public java.lang.String getEncoding()

      The encoding as returned by the underlying OutputStreamWriter. Can be the historical name.
      Returns:
        the encoding
      See Also:
        `OutputStreamWriter.getEncoding()`

    - #### getNormalizedEncoding

          public java.lang.String getNormalizedEncoding()

      The encoding as returned by the underlying OutputStreamWriter. Will be the preferred name.
      Returns:
        the encoding
      See Also:
        `OutputStreamWriter.getEncoding()`