OutputStreamWriter.java: (flush, writeChars): Throw IOException if stream closed.
* java/io/OutputStreamWriter.java: (flush, writeChars): Throw IOException if stream closed. From-SVN: r39559
This commit is contained in:
parent
db9473af45
commit
c2dd346b48
@ -9,6 +9,9 @@
|
|||||||
* java/lang/Float.java: As above.
|
* java/lang/Float.java: As above.
|
||||||
(floatToRawIntBits): New method.
|
(floatToRawIntBits): New method.
|
||||||
|
|
||||||
|
* java/io/OutputStreamWriter.java: (flush, writeChars): Throw
|
||||||
|
IOException if stream closed.
|
||||||
|
|
||||||
2001-02-08 Tom Tromey <tromey@redhat.com>
|
2001-02-08 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* java/lang/Float.java (parseFloat): New method.
|
* java/lang/Float.java (parseFloat): New method.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
|
/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation
|
||||||
|
|
||||||
This file is part of libgcj.
|
This file is part of libgcj.
|
||||||
|
|
||||||
@ -69,6 +69,9 @@ public class OutputStreamWriter extends Writer
|
|||||||
{
|
{
|
||||||
synchronized (lock)
|
synchronized (lock)
|
||||||
{
|
{
|
||||||
|
if (out == null)
|
||||||
|
throw new IOException("Stream closed");
|
||||||
|
|
||||||
if (wcount > 0)
|
if (wcount > 0)
|
||||||
{
|
{
|
||||||
writeChars(work, 0, wcount);
|
writeChars(work, 0, wcount);
|
||||||
@ -97,6 +100,9 @@ public class OutputStreamWriter extends Writer
|
|||||||
private void writeChars(char[] buf, int offset, int count)
|
private void writeChars(char[] buf, int offset, int count)
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
|
if (out == null)
|
||||||
|
throw new IOException("Stream closed");
|
||||||
|
|
||||||
while (count > 0)
|
while (count > 0)
|
||||||
{
|
{
|
||||||
// We must flush if out.count == out.buf.length.
|
// We must flush if out.count == out.buf.length.
|
||||||
|
Loading…
Reference in New Issue
Block a user