Java examples for java.lang:byte Array to int
print Byte Array
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { byte[] byteArray = new byte[] { 34, 35, 36, 37, 37, 37, 67, 68, 69 }; printByteArray(byteArray);/*from ww w.jav a2 s . c om*/ } public static void printByteArray(byte[] byteArray) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < byteArray.length; i++) sb.append(String.format("%02X ", byteArray[i])); System.out.print(sb.toString()); } }