InputStreamReader.java (getEncoding): Return null when closed.

* java/io/InputStreamReader.java (getEncoding): Return null when
       closed.
       * java/io/OutputStreamWriter.java (getEncoding): Likewise.

From-SVN: r62875
This commit is contained in:
Mark Wielaard 2003-02-13 23:28:57 +00:00 committed by Mark Wielaard
parent 530ee84d75
commit 114775850c
3 changed files with 16 additions and 4 deletions

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1998, 1999, 2001 Free Software Foundation
/* Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation
This file is part of libgcj.
@ -70,7 +70,10 @@ public class InputStreamReader extends Reader
}
}
public String getEncoding() { return converter.getName(); }
public String getEncoding()
{
return in != null ? converter.getName() : null;
}
public boolean ready() throws IOException
{