< prev index next >
src/java.base/share/classes/java/io/Reader.java
Print this page
@@ -204,11 +204,11 @@
* been reached
*
* @exception IOException If an I/O error occurs
*/
public int read() throws IOException {
- char cb[] = new char[1];
+ char[] cb = new char[1];
if (read(cb, 0, 1) == -1)
return -1;
else
return cb[0];
}
@@ -223,11 +223,11 @@
* if the end of the stream
* has been reached
*
* @exception IOException If an I/O error occurs
*/
- public int read(char cbuf[]) throws IOException {
+ public int read(char[] cbuf) throws IOException {
return read(cbuf, 0, cbuf.length);
}
/**
* Reads characters into a portion of an array. This method will block
@@ -244,17 +244,17 @@
* @exception IOException If an I/O error occurs
* @exception IndexOutOfBoundsException
* If {@code off} is negative, or {@code len} is negative,
* or {@code len} is greater than {@code cbuf.length - off}
*/
- public abstract int read(char cbuf[], int off, int len) throws IOException;
+ public abstract int read(char[] cbuf, int off, int len) throws IOException;
/** Maximum skip-buffer size */
private static final int maxSkipBufferSize = 8192;
/** Skip buffer, null until allocated */
- private char skipBuffer[] = null;
+ private char[] skipBuffer = null;
/**
* Skips characters. This method will block until some characters are
* available, an I/O error occurs, or the end of the stream is reached.
*
< prev index next >