문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 | 마지막 판 양쪽 다음 판 | ||
java:number [2015/09/24 16:55] kwon37xi |
java:number [2020/08/11 14:19] kwon37xi [Hex 16진수] |
||
---|---|---|---|
줄 56: | 줄 56: | ||
String hex = String.format(" | String hex = String.format(" | ||
</ | </ | ||
+ | * [[https:// | ||
+ | * Apache Commons Codec | ||
+ | <code java> | ||
+ | import org.apache.commons.codec.binary.Hex; | ||
+ | ... | ||
+ | Hex.encodeHexString(someByteArray)); | ||
+ | </ | ||
+ | * 순수 Java | ||
+ | <code java> | ||
+ | byte bytes[] = {(byte)0, (byte)0, (byte)134, (byte)0, (byte)61}; | ||
+ | String hex = javax.xml.bind.DatatypeConverter.printHexBinary(bytes); | ||
+ | </ |