Here you can find the source of printBytes(byte[] ba)
public static void printBytes(byte[] ba)
//package com.java2s; public class Main { public static void printBytes(byte[] ba, boolean doHex) { String format = doHex ? "0x%x " : "%d "; for (byte b : ba) { System.out.printf(format, b); }//w ww .ja v a2 s. c om } public static void printBytes(byte[] ba) { printBytes(ba, false); } }