RFR [9] 8139706: JarFile.getBytes could use InputStream.readNBytes
Alan Bateman
Alan.Bateman at oracle.com
Fri Oct 16 13:28:12 UTC 2015
On 16/10/2015 12:49, Claes Redestad wrote:
>
> Correct, but this is still enough to cause statistically significant
> increases on our footprint measures.
>
> With a reasonable trust limit this change should be safe while
> avoiding most temporary byte[] allocations when reading meta-inf
> files. I've verified the startup and footprint numbers and ran it
> through all java/util/jar and /zip tests without error.
>
> New webrev: http://cr.openjdk.java.net/~redestad/8139706/webrev.02/
You could probably use readNBytes for larger sizes than 64k but what you
have looks fine.
-Alan.
More information about the core-libs-dev
mailing list