PipedWriter.java (flush): Throw exception if stream closed.
authorTom Tromey <tromey@redhat.com>
Tue, 20 Feb 2001 19:01:55 +0000 (19:01 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Tue, 20 Feb 2001 19:01:55 +0000 (19:01 +0000)
commit39f90b7ce07ffa09df609ec724a22fe18606a668
treebea0be04a6a6d1d16e61e97edbf76650ad68223a
parentc9407e4c671efb42c76dbb80a13ecf0c5dc09f05
PipedWriter.java (flush): Throw exception if stream closed.

* java/io/PipedWriter.java (flush): Throw exception if stream
closed.
* java/io/OutputStreamWriter.java (write): Throw exception if
stream closed.
(writeChars): Don't throw exception if stream closed.
* java/io/CharArrayWriter.java (closed): New field.
(close): Set it.
(flush): Throw exception if stream closed.
(reset): Synchronize on correct lock.  Allow stream to be
reopened.
(toCharArray, toString, writeTo): Synchronize.
(write): Throwe exception if stream closed.
* java/io/BufferedWriter.java (close): Clear `buffer'.
(flush): Throw IOException if stream is closed.
(write): Likewise.

From-SVN: r39927
libjava/ChangeLog
libjava/java/io/BufferedWriter.java
libjava/java/io/CharArrayWriter.java
libjava/java/io/OutputStreamWriter.java
libjava/java/io/PipedWriter.java