public class PrintStream extends OutputStream
Constructor and Description |
---|
PrintStream(OutputStream out)
Create a new print stream.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkError()
Flush the stream and check its error state.
|
void |
close()
Close the stream.
|
void |
flush()
Flush the stream.
|
void |
print(boolean b)
Print a boolean value.
|
void |
print(char c)
Print an array of characters.
|
void |
print(double d)
Print a double-precision floating point number.
|
void |
print(float f)
Print a floating point number.
|
void |
print(int i)
Print an integer.
|
void |
print(long l)
Print a long integer.
|
void |
print(Object obj)
Print an object.
|
void |
print(String s)
Print a string.
|
void |
println()
Terminate the current line by writing the line separator string.
|
void |
println(boolean x)
Print a boolean and then terminate the line.
|
void |
println(char x)
Print an array of characters and then terminate the line.
|
void |
println(double x)
Print a double and then terminate the line.
|
void |
println(float x)
Print a float and then terminate the line.
|
void |
println(int x)
Print an integer and then terminate the line.
|
void |
println(long x)
Print a long and then terminate the line.
|
void |
println(Object x)
Print an Object and then terminate the line.
|
void |
println(String x)
Print a String and then terminate the line.
|
protected void |
setError()
Set the error state of the stream to true.
|
void |
write(byte[] buf,
int off,
int len)
Write len bytes from the specified byte array starting at offset off to this stream.
|
void |
write(int b)
Write the specified byte to this stream.
|
write
public PrintStream(OutputStream out)
public boolean checkError()
public void close()
close
in interface AutoCloseable
close
in class OutputStream
public void flush()
flush
in class OutputStream
public void print(boolean b)
public void print(char c)
public void print(double d)
public void print(float f)
public void print(int i)
public void print(long l)
public void print(Object obj)
public void print(String s)
public void println()
public void println(boolean x)
public void println(char x)
public void println(double x)
public void println(float x)
public void println(int x)
public void println(long x)
public void println(Object x)
public void println(String x)
protected void setError()
public void write(byte[] buf, int off, int len)
write
in class OutputStream
public void write(int b)
write
in class OutputStream