Android Byte Array to String Convert toStringForm(byte[] arr)

Here you can find the source of toStringForm(byte[] arr)

Description

to String Form

License

Open Source License

Declaration

public static String toStringForm(byte[] arr) 

Method Source Code

//package com.java2s;
/*/*from  w  w  w  .j  a  v  a2  s .c o m*/
 * Copyright 2004-2008 H2 Group. Multiple-Licensed under the H2 License, Version 1.0, and under the Eclipse Public License, Version 1.0 (http://h2database.com/html/license.html). Initial Developer: H2 Group
 */

public class Main {
    public static String toStringForm(byte[] arr) {
        StringBuilder sb = new StringBuilder();
        for (byte b : arr) {
            sb.append(((int) b) + "");
        }
        return sb.toString();
    }
}

Related

  1. byteTOString(byte[] in, String encoding)
  2. byteToString(byte[] in)
  3. byteToString(int[] byteData)
  4. base16(byte[] data)
  5. ByteArrayToStringList(byte[] byteArray, int dataLength)
  6. toStringUntil(byte[] b, int pos, byte until)
  7. toStringWithLength(byte[] b, int pos, int length)
  8. printBytes(byte[] bytes, StringBuilder builder, int bytesPerLine)
  9. printBytes(byte[] bytes, int bytesPerLine)