code: private String bytesToString(byte[] bytes, int offset, int length)
              throws UnsupportedEncodingException, StringIndexOutOfBoundsException {
          return new String(bytes, offset, length, encoding);
      }
docs: The function to convert a sub-range of an array of bytes into a string.
  
  @param bytes  a string represented by an array of bytes.
  @param offset the initial offset
  @param length the length
  @return the conversion result string.
  @throws UnsupportedEncodingException    when unknown encoding.
  @throws StringIndexOutOfBoundsException when invalid offset and/or length.