This is still in need of final approval, assuming it is OK. Thanks,
Brian On Mar 14, 2018, at 10:50 AM, Brian Burkhalter <brian.burkhal...@oracle.com> wrote: > On Mar 14, 2018, at 9:27 AM, David Lloyd <david.ll...@redhat.com> wrote: > >> @@ -196,14 +194,32 @@ >> return len; >> } >> >> + public synchronized byte[] readAllBytes() { >> + byte[] result = Arrays.copyOfRange(buf, pos, count); >> + pos = count; >> + return result; >> + } >> + >> + public synchronized int readNBytes(byte[] b, int off, int len) { >> + int n = read(b, off, len); >> + return n == -1 ? 0 : n; >> + } >> >> This probably doesn't need to be synchronized, though I imagine the >> difference would be minimal. > > You are correct, it does not. > >> + public synchronized long transferTo(OutputStream out) throws >> IOException { >> + int len = count - pos >> + out.write(but, pos, len); >> >> s/but/buf/ I guess? > > Webrevs corrected in place: > > http://cr.openjdk.java.net/~bpb/8180451/webrev.00-01/ > http://cr.openjdk.java.net/~bpb/8180451/webrev.01/