BigInteger: toByteArray() : BigInteger « java.math « Java by API
- Java by API
- java.math
- BigInteger
BigInteger: toByteArray()
import java.math.BigInteger;
public class Main {
public static void main(String[] argv) throws Exception {
byte[] bytes = new byte[] { 0x1, 0x00, 0x00 };
BigInteger bi = new BigInteger(bytes);
bytes = bi.toByteArray();
}
}
Related examples in the same category