diff options
author | Bryce McKinlay <bryce@albatross.co.nz> | 1999-06-15 20:05:57 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 1999-06-15 21:05:57 +0100 |
commit | cb81310a552c921adbe74c2c0618df0de6628753 (patch) | |
tree | d17069c9b9787eb00fffcb24488f467d5e2beb75 /libjava | |
parent | 3f1892e165fbdbc706b9396652d3f55f54706177 (diff) | |
download | gcc-cb81310a552c921adbe74c2c0618df0de6628753.zip gcc-cb81310a552c921adbe74c2c0618df0de6628753.tar.gz gcc-cb81310a552c921adbe74c2c0618df0de6628753.tar.bz2 |
FilterOutputStream.java (write(byte[])): Rewrite according to JDK 1.2 docs.
* java/io/FilterOutputStream.java (write(byte[])): Rewrite according
to JDK 1.2 docs.
(write(byte[],int,int)): ditto.
From-SVN: r27537
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 6 | ||||
-rw-r--r-- | libjava/java/io/FilterOutputStream.java | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 42bec98..b5e1ba4 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +1999-06-15 Bryce McKinlay <bryce@albatross.co.nz> + + * java/io/FilterOutputStream.java (write(byte[])): Rewrite according + to JDK 1.2 docs. + (write(byte[],int,int)): ditto. + 1999-06-14 Bryce McKinlay <bryce@albatross.co.nz> * posix-threads.cc (_Jv_CondWait): Fix currentTimeMillis() overflow. diff --git a/libjava/java/io/FilterOutputStream.java b/libjava/java/io/FilterOutputStream.java index 45d6fd0..cf498a2 100644 --- a/libjava/java/io/FilterOutputStream.java +++ b/libjava/java/io/FilterOutputStream.java @@ -46,14 +46,15 @@ public class FilterOutputStream extends OutputStream public void write (byte[] b) throws IOException, NullPointerException { // Don't do checking here, per Java Lang Spec. - out.write (b); + write (b, 0, b.length); } public void write (byte[] b, int off, int len) throws IOException, NullPointerException, IndexOutOfBoundsException { // Don't do checking here, per Java Lang Spec. - out.write(b, off, len); + for (int i=0; i < len; i++) + write (b[off + i]); } // The output stream. |