replace calls to ByteBuffer.allocateDirect with ByteBuffer.allocate