Package com.day.util.diff
Class DiffWriter
java.lang.Object
java.io.Writer
com.day.util.diff.DiffWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
Implements a writer that provides an additional method
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.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.Writer
append, append, append, nullWriter
-
Field Details
-
LS_NATIVE
native line separator -
LS_UNIX
unix line separator- See Also:
-
LS_WINDOWS
windows line separator- See Also:
-
-
Constructor Details
-
DiffWriter
-
DiffWriter
- Parameters:
lineSeparator
- the line seperator to use forwriteNewLine()
-
-
Method Details
-
writeNewLine
Writes a new line according to the defined line separator- Throws:
IOException
- if an I/O error occurs
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
- Specified by:
write
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
- Overrides:
write
in classWriter
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-