RFR: 8308753: Class-File API transition to Preview [v24]

Konrad Windszus duke at openjdk.org
Wed Nov 8 15:49:18 UTC 2023


On Wed, 8 Nov 2023 14:07:04 GMT, Chen Liang <liach at openjdk.org> wrote:

> You can simply call `ClassFile.of().parse(inputStream.readAllBytes())` instead.

I know, but for memory consumption reasons everyone should prefer just passing an InputStream. Is the memory consumption with `ClassFile.of().parse(Path)` any better (i.e. are you using a `java.io.RandomAccessFile` or `java.nio.channels.SeekableByteChannel` under the hood)? I think that deserves a sentence in the javadoc.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/15706#issuecomment-1802159417


More information about the build-dev mailing list