Groovy Documentation

## groovy.io
[Java] Class PlatformLineWriter

    java.lang.Object
      java.io.Writer
          groovy.io.PlatformLineWriter

    public class PlatformLineWriter
    extends java.io.Writer

A buffered writer that gobbles any \r characters and replaces every \n with a platform specific newline. In many places Groovy normalises streams to only have \n characters but when creating files that must be used by other platform-aware tools, you sometimes want the newlines to match what the platform expects.

Authors:
  Paul King

Constructor Summary
`PlatformLineWriter(java.io.Writer out)`
`PlatformLineWriter(java.io.Writer out, int sz)`

Method Summary
`void` | `close()`
`void` | `flush()`
`void` | `write(char[] cbuf, int off, int len)`

Methods inherited from class java.io.Writer

java.io.Writer#append(java.lang.CharSequence), java.io.Writer#append(java.lang.CharSequence, int, int), java.io.Writer#append(char), java.io.Writer#append(char), java.io.Writer#append(java.lang.CharSequence, int, int), java.io.Writer#append(java.lang.CharSequence), java.io.Writer#write(int), java.io.Writer#write([C), java.io.Writer#write([C, int, int), java.io.Writer#write(java.lang.String), java.io.Writer#write(java.lang.String, int, int), java.io.Writer#flush(), java.io.Writer#close(), java.io.Writer#wait(long), java.io.Writer#wait(long, int), java.io.Writer#wait(), java.io.Writer#equals(java.lang.Object), java.io.Writer#toString(), java.io.Writer#hashCode(), java.io.Writer#getClass(), java.io.Writer#notify(), java.io.Writer#notifyAll()

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Constructor Detail

### PlatformLineWriter

    public PlatformLineWriter(java.io.Writer out)

### PlatformLineWriter

    public PlatformLineWriter(java.io.Writer out, int sz)

Method Detail

### close

    public void close()

### flush

    public void flush()

### write

    public void write(char[] cbuf, int off, int len)

Groovy Documentation