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

private static final class XdocsTemplateSink.CustomPrintWriter extends PrintWriter
A Custom writer that only prints Unix-style newline character.
  • Field Details

  • Constructor Details

    • CustomPrintWriter

      private CustomPrintWriter(Writer writer)
      Creates a new instance of this custom writer.
      Parameters:
      writer - not null writer to write the result
  • Method Details

    • println

      public void println()
      Enforces Unix-style newline character.
      Overrides:
      println in class PrintWriter
    • write

      public void write(String line, int offset, int length)
      Unifies all newline characters to Unix-Style Newline character.
      Overrides:
      write in class PrintWriter
      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.