if (c=='/')
if ((_partial||_scheme!=_authority) && c=='/')
    private void parse2(byte[] raw,int offset, int length)    {        _raw=raw;        int i=offset;        int e=offset+length;        int state=START;        int m=offset;        _end=offset+length;        _scheme=offset;        _authority=offset;        _host=offset;        _port=offset;        _path=offset;        _param=_end;        _query=_end;        _fragment=_end;        while (i<e)        {            char c=(char)(0xff&_raw[i]);            int s=i++;                        switch (state)            {                case START:                {                    m=s;                    if (c=='/')                    {                        state=AUTH_OR_PATH;                    }                    else if (Character.isLetterOrDigit(c))                    {                        state=SCHEME_OR_PATH;                    }                    else if (c==';')                    {                        _param=s;                        state=PARAM;                    }                    else if (c=='?')                    {                        _param=s;                        _query=s;                        state=QUERY;                    }                    else if (c=='#')                    {                        _param=s;                        _query=s;                        _fragment=s;                        break;                    }                    else                        throw new IllegalArgumentException(new String(_raw,offset,length));                                        continue;                }                case AUTH_OR_PATH:                {                    if (c=='/')                    {                        _host=i;                        state=AUTH;                    }                    else                    {                        _host=m;                        _port=m;                        state=PATH;                    }                      continue;                }                                case SCHEME_OR_PATH:                {                    // short cut for http and https                    if (length>6 && c=='t')                    {                        if (_raw[offset+3]==':')                        {                            s=offset+3;                            i=offset+4;                            c=':';                        }                        else if (_raw[offset+4]==':')                        {                            s=offset+4;                            i=offset+5;                            c=':';                        }                        else if (_raw[offset+5]==':')                        {                            s=offset+5;                            i=offset+6;                            c=':';                        }                    }                                                            if (c==':')                    {                        m=i++;                        _authority=m;                        _path=m;                        c=(char)(0xff&_raw[i]);                        if (c=='/')                            state=AUTH_OR_PATH;                        else                         {                            _host=m;                            _port=m;                            state=PATH;                        }                    }                    else if (c=='/')                    {                        state=PATH;                    }                    else if (c==';')                    {                        _param=s;                        state=PARAM;                    }                    else if (c=='?')                    {                        _param=s;                        _query=s;                        state=QUERY;                    }                    else if (c=='#')                    {                        _param=s;                        _query=s;                        _fragment=s;                        break;                    }                    continue;                }                                case AUTH:                {                    if (c=='/')                    {                        m=s;                        _path=m;                        if (_port<=_authority)                            _port=_path;                        state=PATH;                    }                    else if (c=='@')                    {                        _host=i;                    }                    else if (c==':')                    {                        _port=s;                    }                    continue;                }                                case PATH:                {                    if (c==';')                    {                        _param=s;                        state=PARAM;                    }                    else if (c=='?')                    {                        _param=s;                        _query=s;                        state=QUERY;                    }                    else if (c=='#')                    {                        _param=s;                        _query=s;                        _fragment=s;                        break;                    }                    continue;                }                                case PARAM:                {                    if (c=='?')                    {                        _query=s;                        state=QUERY;                    }                    else if (c=='#')                    {                        _query=s;                        _fragment=s;                        break;                    }                    continue;                }                                case QUERY:                {                    if (c=='#')                    {                        _fragment=s;                        break;                    }                    continue;                }                            }        }    }