hi, another doubt from same set of Notes.
Following is from Chapter 15 of Velmurugan's notes.
* Reader contains these methods for reading characters and arrays of characters:
abstract int read() throws IOException
int read(char cbuf[]) throws IOException
int read(char cbuf[], int offset, int length) throws IOException
InputStream defines the same methods but for reading bytes and arrays of bytes:
abstract int read() throws IOException
int read(byte cbuf[]) throws IOException
int read(byte cbuf[], int offset, int length) throws IOException
* Writer and OutputStream are similarly parallel. Writer defines these methods for writing characters and arrays of characters:
abstract int write(int c) throws IOException
int write(char cbuf[])throws IOException
int write(char cbuf[], int offset, int length) throws IOException
And OutputStream defines the same methods but for bytes:
abstract int write(int c) throws IOException
int write(byte cbuf[]) throws IOException
int write(byte cbuf[], int offset, int length) throws IOException
What I notice is , int read() in Reader is not abstract as per
Java 1.2 source code, but int read (cbut[], offset, length) is abstract. Similarly for writer int write(int) not abstract but int write (cbuf[], offset, length)is.
Can somebody please clear my doubt.