Class DiffWriter
java.lang.Object
java.io.Writer
org.apache.jackrabbit.vault.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
ConstructorsConstructorDescriptionDiffWriter(Writer out) Creates a new diff writer.DiffWriter(Writer out, String lineSeparator) Creates a new diff writer. -
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
Creates a new diff writer.- Parameters:
out- the underlying writer.
-
DiffWriter
Creates a new diff writer.- Parameters:
out- the underlying writer.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:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Specified by:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-