< prev index next >
src/java.base/share/classes/java/io/PrintWriter.java
Print this page
*** 498,508 ****
* @throws IndexOutOfBoundsException
* If the values of the {@code off} and {@code len} parameters
* cause the corresponding method of the underlying {@code Writer}
* to throw an {@code IndexOutOfBoundsException}
*/
! public void write(char buf[], int off, int len) {
try {
synchronized (lock) {
ensureOpen();
out.write(buf, off, len);
}
--- 498,508 ----
* @throws IndexOutOfBoundsException
* If the values of the {@code off} and {@code len} parameters
* cause the corresponding method of the underlying {@code Writer}
* to throw an {@code IndexOutOfBoundsException}
*/
! public void write(char[] buf, int off, int len) {
try {
synchronized (lock) {
ensureOpen();
out.write(buf, off, len);
}
*** 518,528 ****
/**
* Writes an array of characters. This method cannot be inherited from the
* Writer class because it must suppress I/O exceptions.
* @param buf Array of characters to be written
*/
! public void write(char buf[]) {
write(buf, 0, buf.length);
}
/**
* Writes a portion of a string.
--- 518,528 ----
/**
* Writes an array of characters. This method cannot be inherited from the
* Writer class because it must suppress I/O exceptions.
* @param buf Array of characters to be written
*/
! public void write(char[] buf) {
write(buf, 0, buf.length);
}
/**
* Writes a portion of a string.
*** 667,677 ****
*
* @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
--- 667,677 ----
*
* @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
*** 801,811 ****
* behaves as though it invokes {@link #print(char[])} and then
* {@link #println()}.
*
* @param x the array of {@code char} values to be printed
*/
! public void println(char x[]) {
synchronized (lock) {
print(x);
println();
}
}
--- 801,811 ----
* behaves as though it invokes {@link #print(char[])} and then
* {@link #println()}.
*
* @param x the array of {@code char} values to be printed
*/
! public void println(char[] x) {
synchronized (lock) {
print(x);
println();
}
}
< prev index next >