public class TextWriter
extends java.io.FilterWriter
Constructor and Description |
---|
TextWriter(java.io.Writer out)
Create a new TextWriter, without automatic line flushing.
|
TextWriter(java.io.Writer out,
boolean autoFlush)
Create a new TextWriter.
|
Modifier and Type | Method and Description |
---|---|
void |
print(boolean b)
Print a boolean.
|
void |
print(char c)
Print a character.
|
void |
print(char[] s)
Print an array of characters.
|
void |
print(double d)
Print a double.
|
void |
print(float f)
Print a float.
|
void |
print(int i)
Print an integer.
|
void |
print(long l)
Print a long.
|
void |
print(java.lang.Object obj)
Print an object.
|
void |
print(java.lang.String s)
Print a string.
|
void |
println()
Finish the line.
|
void |
println(boolean b)
Print a boolean, and then finish the line.
|
void |
println(char c)
Print a character, and then finish the line.
|
void |
println(char[] c)
Print an array of characters, and then finish the line.
|
void |
println(double d)
Print a double, and then finish the line.
|
void |
println(float f)
Print a float, and then finish the line.
|
void |
println(int i)
Print an integer, and then finish the line.
|
void |
println(long l)
Print a long, and then finish the line.
|
void |
println(java.lang.Object obj)
Print an Object, and then finish the line.
|
void |
println(java.lang.String s)
Print a String, and then finish the line.
|
public TextWriter(java.io.Writer out)
out
- A character-output streampublic TextWriter(java.io.Writer out, boolean autoFlush)
out
- A character-output streamautoFlush
- A boolean; if true, the println() methods will flush
the output bufferpublic void print(boolean b) throws java.io.IOException
b
- the boolean to be printedjava.io.IOException
- if there is a problem writing to the streampublic void print(char c) throws java.io.IOException
c
- the character to be printedjava.io.IOException
- if there is a problem writing to the streampublic void print(int i) throws java.io.IOException
i
- the integer to be printedjava.io.IOException
- if an error occurred while writing to the streampublic void print(long l) throws java.io.IOException
l
- the long to be printedjava.io.IOException
- if an error occurred while writing to the streampublic void print(float f) throws java.io.IOException
f
- the float to be printedjava.io.IOException
- if an error occurred while writing to the streampublic void print(double d) throws java.io.IOException
d
- the double to be printedjava.io.IOException
- if an error occurred while writing to the streampublic void print(char[] s) throws java.io.IOException
s
- the array of characters to be printedjava.io.IOException
- if an error occurred while writing to the streampublic void print(java.lang.String s) throws java.io.IOException
s
- the string to be printedjava.io.IOException
- if an error occurred while writing to the streampublic void print(java.lang.Object obj) throws java.io.IOException
obj
- the object to be printedjava.io.IOException
- if an error occurred while writing to the streampublic void println() throws java.io.IOException
java.io.IOException
- if an error occurred while writing to the streampublic void println(boolean b) throws java.io.IOException
b
- the boolean to be printedjava.io.IOException
- if an error occurred while writing to the streampublic void println(char c) throws java.io.IOException
c
- the character to beprintedjava.io.IOException
- if an error occurred while writing to the streampublic void println(int i) throws java.io.IOException
i
- the int to be printedjava.io.IOException
- if an error occurred while writing to the streampublic void println(long l) throws java.io.IOException
l
- the long to be printedjava.io.IOException
- if an error occurred while writing to the streampublic void println(float f) throws java.io.IOException
f
- the float to be printedjava.io.IOException
- if an error occurred while writing to the streampublic void println(double d) throws java.io.IOException
d
- the double to be printedjava.io.IOException
- if an error occurred while writing to the streampublic void println(char[] c) throws java.io.IOException
c
- the array of characters to be printedjava.io.IOException
- if an error occurred while writing to the streampublic void println(java.lang.String s) throws java.io.IOException
s
- the string to be printedjava.io.IOException
- if an error occurred while writing to the streampublic void println(java.lang.Object obj) throws java.io.IOException
obj
- the object to be printedjava.io.IOException
- if an error occurred while writing to the streamCopyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.