simplify ByteBuffer operation