Use ByteBuffer to convert to int