Java Byte Array to String bytetoString(byte[] tb)

Here you can find the source of bytetoString(byte[] tb)

Description

byteto String

License

Open Source License

Declaration

public static String bytetoString(byte[] tb) 

Method Source Code

//package com.java2s;
/*//from  ww  w  .j a v  a2  s  .  c om
 * Copyright (c) 2015 Dell Inc. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */

public class Main {
    public static String bytetoString(byte[] tb) {
        StringBuffer tsb = new StringBuffer();
        for (int i = 0; i < tb.length; i++) {
            tsb.append(Integer.toHexString((int) tb[i]));
        }
        return tsb.toString();

    }
}

Related

  1. byteToString(byte[] bytearray)
  2. byteToString(byte[] bytes)
  3. byteToString(byte[] data)
  4. bytetoString(byte[] digest)
  5. byteToString(byte[] input)
  6. byteToString(final boolean prettyPrint, int byteValue)
  7. byteToString(int[] byteData)