code: public static void parseParameters( final Map<String, String[]> map, final byte[] data, final String encoding )
          throws UnsupportedEncodingException
      {
  
          if ( data != null && data.length > 0 )
          {
              int ix = 0;
              int ox = 0;
              String key = null;
              String value = null;
              while ( ix < data.length )
              {
                  final byte c = data[ix++];
                  switch ( (char) c )
                  {
                      case '&':
                          value = new String( data, 0, ox, encoding );
                          if ( key != null )
                          {
                              putMapEntry( map, key, value );
                              key = null;
                          }
                          ox = 0;
                          break;
                      case '=':
                          if ( key == null )
                          {
                              key = new String( data, 0, ox, encoding );
                              ox = 0;
                          }
                          else
                          {
                              data[ox++] = c;
                          }
                          break;
                      case '+':
                          data[ox++] = (byte) ' ';
                          break;
                      case '%':
                          data[ox++] = (byte) ( ( convertHexDigit( data[ix++] ) << 4 ) + convertHexDigit( data[ix++] ) );
                          break;
                      default:
                          data[ox++] = c;
                  }
              }
              // The last value does not end in '&'. So save it now.
              if ( key != null )
              {
                  value = new String( data, 0, ox, encoding );
                  putMapEntry( map, key, value );
              }
          }
  
      }
docs: Append request parameters from the specified String to the specified Map.
  It is presumed that the specified Map is not accessed from any other
  thread, so no synchronization is performed.
  <p>
  <strong>IMPLEMENTATION NOTE</strong>: URL decoding is performed
  individually on the parsed name and value elements, rather than on the
  entire query string ahead of time, to properly deal with the case where
  the name or value includes an encoded "=" or "&" character that would
  otherwise be interpreted as a delimiter. NOTE: byte array data is
  modified by this method. Caller beware.
  
  @param map
  Map that accumulates the resulting parameters
  @param data
  Input string containing request parameters
  @param encoding
  Encoding to use for converting hex
  
  @exception UnsupportedEncodingException
  if the data is malformed