We need to multiply a double from the parsed string by the number of bytes in a petabyte. If we multiply the double by a long, the long will be cast to a double and will lose precision when it is large enough, which it is in the case of a petabyte. I think the safest and simplest way to do this calculation is to use a BigDecimal for the petabyte value.