public class DiffWriter
extends java.io.Writer
writeNewLine()
that can be used for writing line separators which can be defined. A
PrintWriter
would actually be better, but it does not support
defining the line separator to use.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LS_NATIVE
native line separator
|
static java.lang.String |
LS_UNIX
unix line separator
|
static java.lang.String |
LS_WINDOWS
windows line separator
|
Constructor and Description |
---|
DiffWriter(java.io.Writer out) |
DiffWriter(java.io.Writer out,
java.lang.String lineSeparator) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
void |
write(char[] cbuf) |
void |
write(char[] cbuf,
int off,
int len) |
void |
write(int c) |
void |
write(java.lang.String str) |
void |
write(java.lang.String str,
int off,
int len) |
void |
writeNewLine()
Writes a new line according to the defined line separator
|
public static final java.lang.String LS_NATIVE
public static final java.lang.String LS_UNIX
public static final java.lang.String LS_WINDOWS
public DiffWriter(java.io.Writer out)
public DiffWriter(java.io.Writer out, java.lang.String lineSeparator)
lineSeparator
- the line seperator to use for writeNewLine()
public void writeNewLine() throws java.io.IOException
java.io.IOException
- if an I/O error occurspublic void write(int c) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
public void write(char[] cbuf) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
public void write(char[] cbuf, int off, int len) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
public void write(java.lang.String str) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
public void write(java.lang.String str, int off, int len) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.Writer
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.Writer
java.io.IOException
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"