public String(byte[] data,int start,int length){
  if (start >= 0 && 0 <= length && length <= data.length - start) {
    offset=0;
    Charset charset=defaultCharset();
    int result;
    CharBuffer cb=charset.decode(ByteBuffer.wrap(data,start,length));
    if ((result=cb.length()) > 0) {
      value=cb.array();
      count=result;
    }
 else {
      count=0;
      value=new char[0];
    }
  }
 else {
    throw new StringIndexOutOfBoundsException();
  }
}

public String ( byte [ ] data , int start , int length ) { if ( start >= 0 && 0 <= length && length <= data . length - start ) { offset = 0 ; Charset charset = defaultCharset ( ) ; int result ; CharBuffer cb = charset . decode ( ByteBuffer . wrap ( data , start , length ) ) ; if ( ( result = cb . length ( ) ) > 0 ) { value = cb . array ( ) ; count = result ; } else { count = 0 ; value = new char [ 0 ] ; } } else { throw new StringIndexOutOfBoundsException ( ) ; } }
converts the byte array to a string using the default encoding as specified by the file . encoding system property . if the system property is not defined , the default encoding is iso8859_1 ( iso - latin - 1 ) . if 8859 - 1 is not available , an ascii encoding is used .
