This is the mail archive of the
mauve-discuss@sources.redhat.com
mailing list for the Mauve project.
Question about PipedInputStream available method
- From: "Patrick Ellis" <Patrick dot Ellis at sas dot com>
- To: <mauve-discuss at sources dot redhat dot com>
- Date: Wed, 5 Mar 2003 17:46:59 -0500
- Subject: Question about PipedInputStream available method
In the gnu/testlet/java/io/PipedStream/Test.java code, there is a call to method available() which Returns the number of bytes that can be read from this input stream without blocking. The first call to the method returns zero which causes the test to fail. Should the code be change to
harness.check(pis.available() >= 0, "available()");
// Now set up our reader
PipedInputStream pis = new PipedInputStream();
pis.connect(pos);
new Thread(pstw).start();
harness.check(pis.available() > 0, "available()");
Pat Ellis
SDE Build and Test Team
Phone: (919) 531-0355
R2263 Patrick dot Ellis at sas dot com
SAS... The Power to Know