Use sun.misc.Unsafe to access a direct buffer if possible
Simplify
Use PlatformDependent