< prev index next >
src/java.base/share/classes/java/io/BufferedWriter.java
Print this page
*** 65,75 ****
public class BufferedWriter extends Writer {
private Writer out;
! private char cb[];
private int nChars, nextChar;
private static int defaultCharBufferSize = 8192;
/**
--- 65,75 ----
public class BufferedWriter extends Writer {
private Writer out;
! private char[] cb;
private int nChars, nextChar;
private static int defaultCharBufferSize = 8192;
/**
*** 164,174 ****
* or {@code off + len} is negative or greater than the length
* of the given array
*
* @throws IOException If an I/O error occurs
*/
! public void write(char cbuf[], int off, int len) throws IOException {
synchronized (lock) {
ensureOpen();
if ((off < 0) || (off > cbuf.length) || (len < 0) ||
((off + len) > cbuf.length) || ((off + len) < 0)) {
throw new IndexOutOfBoundsException();
--- 164,174 ----
* or {@code off + len} is negative or greater than the length
* of the given array
*
* @throws IOException If an I/O error occurs
*/
! public void write(char[] cbuf, int off, int len) throws IOException {
synchronized (lock) {
ensureOpen();
if ((off < 0) || (off > cbuf.length) || (len < 0) ||
((off + len) > cbuf.length) || ((off + len) < 0)) {
throw new IndexOutOfBoundsException();
< prev index next >