[Java] Hex String & Byte Array 轉換
2011-06-01 00:00
1 minute read
public String toHexString(byte[] in){
    BigInteger temp = new BigInteger(in);
  return temp.toString(16);
}

public byte[] fromHexString(String in){
    BigInteger temp = new BigInteger(in, 16);
  return temp.toByteArray();
}  

文章參考自此


Back to posts


comments powered by Disqus