Class InternetPrintWriter

java.lang.Object
java.io.Writer
java.io.PrintWriter
com.icegreen.greenmail.util.InternetPrintWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public class InternetPrintWriter extends PrintWriter
Writes to a wrapped Writer class, ensuring that all line separators are '\r\n', regardless of platform.
  • Constructor Details

    • InternetPrintWriter

      public InternetPrintWriter(Writer out)
      Constructor that takes a writer to wrap.
      Parameters:
      out - the wrapped Writer
    • InternetPrintWriter

      public InternetPrintWriter(Writer out, boolean autoFlush)
      Constructor that takes a writer to wrap.
      Parameters:
      out - the wrapped Writer
      autoFlush - whether to flush after each print call
    • InternetPrintWriter

      public InternetPrintWriter(OutputStream out)
      Constructor that takes a stream to wrap.
      Parameters:
      out - the wrapped OutputStream
    • InternetPrintWriter

      public InternetPrintWriter(OutputStream out, boolean autoFlush)
      Constructor that takes a stream to wrap.
      Parameters:
      out - the wrapped OutputStream
      autoFlush - whether to flush after each print call
  • Method Details

    • println

      public void println()
      Print a line separator.
      Overrides:
      println in class PrintWriter
    • println

      public void println(boolean x)
      Print a boolean followed by a line separator.
      Overrides:
      println in class PrintWriter
      Parameters:
      x - the boolean to print
    • println

      public void println(char x)
      Print a char followed by a line separator.
      Overrides:
      println in class PrintWriter
      Parameters:
      x - the char to print
    • println

      public void println(int x)
      Print a int followed by a line separator.
      Overrides:
      println in class PrintWriter
      Parameters:
      x - the int to print
    • println

      public void println(long x)
      Print a long followed by a line separator.
      Overrides:
      println in class PrintWriter
      Parameters:
      x - the long to print
    • println

      public void println(float x)
      Print a float followed by a line separator.
      Overrides:
      println in class PrintWriter
      Parameters:
      x - the float to print
    • println

      public void println(double x)
      Print a double followed by a line separator.
      Overrides:
      println in class PrintWriter
      Parameters:
      x - the double to print
    • println

      public void println(char[] x)
      Print a character array followed by a line separator.
      Overrides:
      println in class PrintWriter
      Parameters:
      x - the character array to print
    • println

      public void println(String x)
      Print a String followed by a line separator.
      Overrides:
      println in class PrintWriter
      Parameters:
      x - the String to print
    • println

      public void println(Object x)
      Print an Object followed by a line separator.
      Overrides:
      println in class PrintWriter
      Parameters:
      x - the Object to print