This is the mail archive of the mailing list for the Mauve project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Is InputStreamReader.ready method deprecated ?

Question: I have a testcase that is failing across several platforms (UNIX, LINUX, WINDOWS, etc) that according to the comment in the code was deprecated after 1.1 but I can NOT find any documentation or statement from the SUN JavaTM 2 Platform, Standard Edition, v 1.4.1 website or any books that say the code should be deprecated for the
InputStreamReader.ready method . Has the function been deprecated ?

// Tags: JDK1.1


import gnu.testlet.Testlet;
import gnu.testlet.TestHarness;


public class jdk11 implements Testlet
  public void test (TestHarness harness)
                InputStreamReader isr = new InputStreamReader (new StringBufferInputStream ("zardoz has spoken"));
                harness.check(!isr.ready(), "ready()");   // deprecated post-1.1
                harness.check(isr.getEncoding(), "8859_1", "getEncoding");
                char[] cbuf = new char[10];
       (cbuf, 0, cbuf.length);
                String tst = new String(cbuf);
                harness.check(tst, "zardoz has", "read(buf[], off, len)");
                harness.check(, ' ', "read()");
                isr.close ();
                harness.check(true, "close()");
    catch (IOException e)
                harness.check(false, "IOException unexpected");

Pat Ellis
SDE Build and Test Team
Phone:      (919) 531-0355   
R2263     Patrick dot Ellis at sas dot com
SAS...  The Power to Know

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]