[OpenJDK 2D-Dev] Using VarHandle to read/write primitives

Brett Okken brett.okken.os at gmail.com
Thu Jan 14 17:09:16 UTC 2021


In ImageInputStreamImpl and ImageOutputStreamImpl there are methods to
read and write other primitive and primitive array types.

Has there been thought of using byte array view VarHandles[1] to
implement these actions rather than bit twiddling?

[1] - https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/invoke/MethodHandles.html#byteArrayViewVarHandle(java.lang.Class,java.nio.ByteOrder)


More information about the 2d-dev mailing list