Here you can find the source of getString(byte[] originalByte, int start, int length)
public static String getString(byte[] originalByte, int start, int length)
//package com.java2s; import java.util.Arrays; public class Main { public static String getString(byte[] bb) { return new String(bb); }/* w w w . j a va2 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); } }