Package com.icegreen.greenmail.util
Class InternetPrintWriter
java.lang.Object
java.io.Writer
java.io.PrintWriter
com.icegreen.greenmail.util.InternetPrintWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
Writes to a wrapped Writer class, ensuring that all line separators are '\r\n', regardless
of platform.
-
Field Summary
Fields inherited from class java.io.PrintWriter
out
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor that takes a stream to wrap.InternetPrintWriter
(OutputStream out, boolean autoFlush) Constructor that takes a stream to wrap.Constructor that takes a writer to wrap.InternetPrintWriter
(Writer out, boolean autoFlush) Constructor that takes a writer to wrap. -
Method Summary
Modifier and TypeMethodDescriptionvoid
println()
Print a line separator.void
println
(boolean x) Print a boolean followed by a line separator.void
println
(char x) Print a char followed by a line separator.void
println
(char[] x) Print a character array followed by a line separator.void
println
(double x) Print a double followed by a line separator.void
println
(float x) Print a float followed by a line separator.void
println
(int x) Print a int followed by a line separator.void
println
(long x) Print a long followed by a line separator.void
Print an Object followed by a line separator.void
Print a String followed by a line separator.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, setError, write, write, write, write, write
Methods inherited from class java.io.Writer
nullWriter
-
Constructor Details
-
InternetPrintWriter
Constructor that takes a writer to wrap.- Parameters:
out
- the wrapped Writer
-
InternetPrintWriter
Constructor that takes a writer to wrap.- Parameters:
out
- the wrapped WriterautoFlush
- whether to flush after each print call
-
InternetPrintWriter
Constructor that takes a stream to wrap.- Parameters:
out
- the wrapped OutputStream
-
InternetPrintWriter
Constructor that takes a stream to wrap.- Parameters:
out
- the wrapped OutputStreamautoFlush
- whether to flush after each print call
-
-
Method Details
-
println
public void println()Print a line separator.- Overrides:
println
in classPrintWriter
-
println
public void println(boolean x) Print a boolean followed by a line separator.- Overrides:
println
in classPrintWriter
- Parameters:
x
- the boolean to print
-
println
public void println(char x) Print a char followed by a line separator.- Overrides:
println
in classPrintWriter
- Parameters:
x
- the char to print
-
println
public void println(int x) Print a int followed by a line separator.- Overrides:
println
in classPrintWriter
- Parameters:
x
- the int to print
-
println
public void println(long x) Print a long followed by a line separator.- Overrides:
println
in classPrintWriter
- Parameters:
x
- the long to print
-
println
public void println(float x) Print a float followed by a line separator.- Overrides:
println
in classPrintWriter
- Parameters:
x
- the float to print
-
println
public void println(double x) Print a double followed by a line separator.- Overrides:
println
in classPrintWriter
- Parameters:
x
- the double to print
-
println
public void println(char[] x) Print a character array followed by a line separator.- Overrides:
println
in classPrintWriter
- Parameters:
x
- the character array to print
-
println
Print a String followed by a line separator.- Overrides:
println
in classPrintWriter
- Parameters:
x
- the String to print
-
println
Print an Object followed by a line separator.- Overrides:
println
in classPrintWriter
- Parameters:
x
- the Object to print
-