RFR: 8374727: Audio configuration Platform class - use nio for getting endianness of the underlying platform [v3]
Matthias Baesken
mbaesken at openjdk.org
Tue Jan 13 17:01:50 UTC 2026
On Tue, 13 Jan 2026 14:12:11 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> Currently Platform.java from the audio coding uses its own native code to get the endianness info of the underlying hardware it runs on.
>> See https://github.com/openjdk/jdk/blob/da14813a5bdadaf0a1f81fa57ff6e1b103eaf113/src/java.desktop/share/classes/com/sun/media/sound/Platform.java#L86
>> But we can reuse existing Java JDK code e.g. from nio.
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>
> Add import
Thanks for the reviews !
Btw. what do you think about having direct helper methods in ByteOrder, like
`ByteOrder.nativeOrderIsBigEndian()`
to shorten the coding a bit (here and also at other places) ?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29113#issuecomment-3745399160
PR Comment: https://git.openjdk.org/jdk/pull/29113#issuecomment-3745409130
More information about the client-libs-dev
mailing list