The attached patch brings BufferedInputStream over from Classpath with
the only changes being that the copyright in Classpath omits 2004 and
had refill() being private.
refill has to have default visibility because InputStreamReader does
some highly questionable things with it. Since the file was in fact
changed in 2004 I thought the copyright should reflect that.
I added the PR testcase to mauve and did make check in libjava and
mauve with no regressions on the 4.0.0 branch (i686-pc-linux).
2005-03-09 David Daney <address@hidden>
PR libgcj/20389
Merge BufferedInputStream from GNU Classpath.
* java/io/BufferedInputStream.java (marktarget): Field removed.
(CHUNKSIZE): Field removed.
(bufferSize): New field.
(BufferedInputStream): Initialize fields.
(close): Invalidate mark and buffer indexes.
(mark): Rewritten.
(read()): Move mark handling code to refill.
(read(byte[], int, int)): Ditto.
(skip): Ditto and simplify EOF testing.
(refill): Rewritten.
* java/io/InputStreamReader.java (refill): Removed mark and reset
of internal BufferedInputStream.
OK to commit to the 4.0 branch and mainline?