Here you can find the source of getString(byte[] bb)
public static String getString(byte[] bb)
//package com.java2s; import java.util.Arrays; public class Main { public static String getString(byte[] bb) { return new String(bb); }/*from w w w .j av a 2 s. c o m*/ public static String getString(byte[] originalByte, int start, int length) { byte[] strByte = Arrays.copyOfRange(originalByte, start, start + length); return new String(strByte); } }