< prev index next >
src/java.base/share/classes/java/io/PrintStream.java
Print this page
*** 550,560 ****
*
* @param buf A byte array
* @param off Offset from which to start taking bytes
* @param len Number of bytes to write
*/
! public void write(byte buf[], int off, int len) {
try {
synchronized (this) {
ensureOpen();
out.write(buf, off, len);
if (autoFlush)
--- 550,560 ----
*
* @param buf A byte array
* @param off Offset from which to start taking bytes
* @param len Number of bytes to write
*/
! public void write(byte[] buf, int off, int len) {
try {
synchronized (this) {
ensureOpen();
out.write(buf, off, len);
if (autoFlush)
*** 573,583 ****
* The following private methods on the text- and character-output streams
* always flush the stream buffers, so that writes to the underlying byte
* stream occur as promptly as with the original PrintStream.
*/
! private void write(char buf[]) {
try {
synchronized (this) {
ensureOpen();
textOut.write(buf);
textOut.flushBuffer();
--- 573,583 ----
* The following private methods on the text- and character-output streams
* always flush the stream buffers, so that writes to the underlying byte
* stream occur as promptly as with the original PrintStream.
*/
! private void write(char[] buf) {
try {
synchronized (this) {
ensureOpen();
textOut.write(buf);
textOut.flushBuffer();
*** 726,736 ****
*
* @param s The array of chars to be printed
*
* @throws NullPointerException If {@code s} is {@code null}
*/
! public void print(char s[]) {
write(s);
}
/**
* Prints a string. If the argument is {@code null} then the string
--- 726,736 ----
*
* @param s The array of chars to be printed
*
* @throws NullPointerException If {@code s} is {@code null}
*/
! public void print(char[] s) {
write(s);
}
/**
* Prints a string. If the argument is {@code null} then the string
*** 861,871 ****
* behaves as though it invokes {@link #print(char[])} and
* then {@link #println()}.
*
* @param x an array of chars to print.
*/
! public void println(char x[]) {
synchronized (this) {
print(x);
newLine();
}
}
--- 861,871 ----
* behaves as though it invokes {@link #print(char[])} and
* then {@link #println()}.
*
* @param x an array of chars to print.
*/
! public void println(char[] x) {
synchronized (this) {
print(x);
newLine();
}
}
< prev index next >