Avoid creating a new ByteBuffer at every read or write attempt.