replaced ByteBuffer with Unsafe to gain performance.