From d8048dc2f71b8daa7ff9641134e489101cbc220c Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Fri, 9 May 2003 07:10:58 +0000 Subject: 2003-05-09 Michael Koch * java/io/DataOutputStream.java (writeShort): Made it synchronized. (writeChar): Likewise. (writeInt): Likewise. (writeLong): Liekwise. (writeUTF): Made it synchronized, renamed argument to match classpath. * java/io/InputStreamReader.java (converter): Added documentation. (read): Merged documentation from classpath. * java/io/OutputStreamWriter.java (OutputStreamWriter): Merged documentation from classpath. (close): Reformatted. (getEncoding): Likewise. (flush): Likewise. (write): Merged documentation from classpath, reformatted. From-SVN: r66624 --- libjava/java/io/InputStreamReader.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'libjava/java/io/InputStreamReader.java') diff --git a/libjava/java/io/InputStreamReader.java b/libjava/java/io/InputStreamReader.java index d01541d..05ed5fe 100644 --- a/libjava/java/io/InputStreamReader.java +++ b/libjava/java/io/InputStreamReader.java @@ -96,6 +96,10 @@ public class InputStreamReader extends Reader // Last available character (in work buffer) to read. int wcount; + /* + * This is the byte-character decoder class that does the reading and + * translation of bytes from the underlying stream. + */ BytesToUnicode converter; /** @@ -201,7 +205,20 @@ public class InputStreamReader extends Reader } } - public int read(char buf[], int offset, int length) throws IOException + /** + * This method reads up to length characters from the stream into + * the specified array starting at index offset into the + * array. + * + * @param buf The character array to recieve the data read + * @param offset The offset into the array to start storing characters + * @param length The requested number of characters to read. + * + * @return The actual number of characters read, or -1 if end of stream. + * + * @exception IOException If an error occurs + */ + public int read (char[] buf, int offset, int length) throws IOException { synchronized (lock) { -- cgit v1.1