Class XdocsTemplateSink.CustomPrintWriter
java.lang.Object
java.io.Writer
java.io.PrintWriter
com.puppycrawl.tools.checkstyle.site.XdocsTemplateSink.CustomPrintWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
- Enclosing class:
- XdocsTemplateSink
A Custom writer that only prints Unix-style newline character.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Pattern
A Regex pattern to represent all kinds of newline character.private static final String
Unix-Style newline character.Fields inherited from class java.io.PrintWriter
out
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
CustomPrintWriter
(Writer writer) Creates a new instance of this custom writer. -
Method Summary
Methods inherited from class java.io.PrintWriter
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, setError, write, write, write, write
Methods inherited from class java.io.Writer
nullWriter
-
Field Details
-
LINE_BREAK_ESCAPE
A Regex pattern to represent all kinds of newline character. -
NEWLINE
Unix-Style newline character.- See Also:
-
-
Constructor Details
-
CustomPrintWriter
Creates a new instance of this custom writer.- Parameters:
writer
- not null writer to write the result
-
-
Method Details
-
println
Enforces Unix-style newline character.- Overrides:
println
in classPrintWriter
-
write
Unifies all newline characters to Unix-Style Newline character.- Overrides:
write
in classPrintWriter
- Parameters:
line
- text that is to be written in the output file.offset
- starting offset value for writing data.length
- total length of string to be written.
-