Here you can find the source of dumpBytes(byte[] data)
public static final String dumpBytes(byte[] data)
//package com.java2s; /*/*from w ww . j a v a 2 s . co m*/ * This file is part of jsFlow. * * Copyright (c) 2009 DE-CIX Management GmbH <http://www.de-cix.net> - All rights * reserved. * * Author: Thomas King <thomas.king@de-cix.net> * * This software is licensed under the Apache License, version 2.0. A copy of * the license agreement is included in this distribution. */ public class Main { public static final String dumpBytes(byte[] data) { StringBuilder sb = new StringBuilder(); int i = 0; for (byte b : data) { i++; sb.append(String.valueOf(b)); if (i < data.length) sb.append(", "); if ((i % 15) == 0) sb.append("\n"); } return sb.toString(); } }