Why don't you use the BigInteger(String)
constructor ? That way, round-tripping via toString()
should work fine.
(note also that your conversion to bytes doesn't explicitly specify a character-encoding and is platform-dependent - that could be source of grief further down the line)