-
Sub-task
-
Resolution: Fixed
-
P4
-
9
-
b01
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8239203 | openjdk8u252 | Andrew Hughes | P4 | Resolved | Fixed | b03 |
JDK-8237173 | openjdk8u242 | Andrew Hughes | P4 | Resolved | Fixed | b07 |
JDK-8239999 | openjdk7u | Andrew Hughes | P4 | Resolved | Fixed | master |
Consider adding a blocking variant of readNBytes(int) that allocates
the byte[] of up to "len" length internally and returns it. The method should be a suitable replacement for the internal sun.misc.IOUtils.readFully.
sun.misc.IOUtils is a JDK internal convenience utility class that
provides a single method that offers bulk blocking InputStream read
semantics.
There are a number of places, mainly in the security implementation,
that required to read a specific number of bytes ( not to end of
stream ), where it is preferable to not preallocate the byte[] and
allow it to "grow" lazily, to be defensive against protocol errors.
These cases cannot use read[N|All]Bytes.
The discussion that lead to the filing of this issue can be found at:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-October/035693.html
the byte[] of up to "len" length internally and returns it. The method should be a suitable replacement for the internal sun.misc.IOUtils.readFully.
sun.misc.IOUtils is a JDK internal convenience utility class that
provides a single method that offers bulk blocking InputStream read
semantics.
There are a number of places, mainly in the security implementation,
that required to read a specific number of bytes ( not to end of
stream ), where it is preferable to not preallocate the byte[] and
allow it to "grow" lazily, to be defensive against protocol errors.
These cases cannot use read[N|All]Bytes.
The discussion that lead to the filing of this issue can be found at:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-October/035693.html
- backported by
-
JDK-8237173 Add InputStream readNBytes(int len)
- Resolved
-
JDK-8239203 Add InputStream readNBytes(int len)
- Resolved
-
JDK-8239999 Add InputStream readNBytes(int len)
- Resolved
- csr for
-
JDK-8194956 Add InputStream readNBytes(int len)
- Closed
- duplicates
-
JDK-8182151 Request for InputStream::readNBytes(int length)
- Closed
-
JDK-8185575 new method InputStream.readAllBytes(int n) to read up to n bytes
- Closed
- links to
(1 duplicates, 1 links to)