Yes, it seems that none of the methods for getting the full URI include the userinfo. It is intenionaly removed in setURI():

if (_authority != null) { // has_authority
    if (_userinfo != null) { // by default, remove userinfo part
        if (_host != null) {
            buf.append(_host);
            if (_port != -1) {
                buf.append(':');
                buf.append(_port);
            }
        }
    } else {
        buf.append(_authority);
    }
}

Why is this the case? I have no idea. Anyone else has some thoughts on this one?

The only workaround at this point is to build the URI string manually from all of the constituent pieces, much like setURI() does.

Mike

Marcus Crafter wrote:
Hi All,

Hope all is well!

If I put the following text into the URI class:

ftp://anonymous:[EMAIL PROTECTED]/incoming/

Is it possible to get that text back out of the URI class via one of the
get* methods, or similar ?

From what I can see, all return the URI excluding the user info, but I need
in my application I need to get the original string back to pass to the Avalon SourceResolver library.


I guess there must be some way to extract the original string ? Have I missed something somewhere ?

Cheers,

Marcus



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to