Switching from byte[] to ByteBuffer