diff options
author | Michael Koch <konqueror@gmx.de> | 2003-05-09 07:10:58 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2003-05-09 07:10:58 +0000 |
commit | d8048dc2f71b8daa7ff9641134e489101cbc220c (patch) | |
tree | a797ca5335f924837358099e840e7ae02cb75506 /libjava/java/io/InputStreamReader.java | |
parent | c6b97fac181cd452623b4208eb0c8209b6c47c71 (diff) | |
download | gcc-d8048dc2f71b8daa7ff9641134e489101cbc220c.zip gcc-d8048dc2f71b8daa7ff9641134e489101cbc220c.tar.gz gcc-d8048dc2f71b8daa7ff9641134e489101cbc220c.tar.bz2 |
2003-05-09 Michael Koch <konqueror@gmx.de>
* 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
Diffstat (limited to 'libjava/java/io/InputStreamReader.java')
-rw-r--r-- | libjava/java/io/InputStreamReader.java | 19 |
1 files changed, 18 insertions, 1 deletions
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 <code>length</code> characters from the stream into + * the specified array starting at index <code>offset</code> 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) { |