public static final String readString(byte[] bytes,int offset,int length,String charset) throws IOException {
  return readString(bytes,0,bytes.length,Charset.forName(charset));
}

public static final String readString ( byte [ ] bytes , int offset , int length , String charset ) throws IOException { return readString ( bytes , 0 , bytes . length , Charset . forName ( charset ) ) ; }
convert a byte array to a string ; consistently uses \ n line endings in java . the conversion is limited to the specified offset / length pair , and uses the requested charset to decode the bytes .
