Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#FFcccc
BigInteger x = new BigInteger("530500452766");
// convert x to a String
byte[] byteArray = x.toByteArray();
String s = new String(byteArray);
// convert s back to a BigInteger
byteArray = s.getBytes();
x = new BigInteger(byteArray);

When this program was run on a Linux platform where the default character encoding is US-ASCII, the string s gets got the value {{{J}}?J??, because some of the characters are were unprintable. When converted back to a BigInteger, x gets got the value 149830058370101340468658109.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="641eb86e3c4b9038-ac652cf4-4bea479d-bbf9b6a5-019d6ac6ac4a62e88a939d36"><ac:plain-text-body><![CDATA[

[[API 2006

AA. Bibliography#API 06]]

class [String

http://java.sun.com/javase/6/docs/api/java/lang/String.html]

]]></ac:plain-text-body></ac:structured-macro>

...