else if (buffer.length()>0) { map.add(buffer.toString(),""); }
    public static void decodeUtf8To(byte[] raw,int offset, int length, MultiMap map)    {        synchronized(map)        {            Utf8StringBuffer buffer = new Utf8StringBuffer();            String key = null;            String value = null;                        // TODO cache of parameter names ???            int end=offset+length;            for (int i=offset;i<end;i++)            {                byte b=raw[i];                switch ((char)(0xff&b))                {                    case '&':                        value = buffer.length()==0?null:buffer.toString();                        buffer.reset();                        if (key != null)                        {                            map.add(key,value);                            key = null;                            value=null;                        }                        else if (value!=null)                        {                            map.add(value,null);                            value=null;                        }                        break;                                            case '=':                        if (key!=null)                        {                            buffer.append(b);                            break;                        }                        key = buffer.toString();                        buffer.reset();                        break;                                            case '+':                        buffer.append((byte)' ');                        break;                                            case '%':                        if (i+2<end)                            buffer.append((byte)((TypeUtil.convertHexDigit(raw[++i])<<4) + TypeUtil.convertHexDigit(raw[++i])));                        break;                    default:                        buffer.append(b);                    break;                }            }                        if (key != null)            {                value = buffer.toString();                buffer.reset();                map.add(key,value);            }        }    }