FileDocCategorySizeDatePackage
Handler.javaAPI DocJCIFS 1.3.17 API2291Tue Oct 18 15:26:24 BST 2011jcifs.smb

Handler

public class Handler extends URLStreamHandler

Fields Summary
static final URLStreamHandler
SMB_HANDLER
Constructors Summary
Methods Summary
protected intgetDefaultPort()


       
        return SmbConstants.DEFAULT_PORT;
    
public java.net.URLConnectionopenConnection(java.net.URL u)

        return new SmbFile( u );
    
protected voidparseURL(java.net.URL u, java.lang.String spec, int start, int limit)

        String host = u.getHost();
        String path, ref;
        int port;

        if( spec.equals( "smb://" )) {
            spec = "smb:////";
            limit += 2;
        } else if( spec.startsWith( "smb://" ) == false &&
                    host != null && host.length() == 0 ) {
            spec = "//" + spec;
            limit += 2;
        }
        super.parseURL( u, spec, start, limit );
        path = u.getPath();
        ref = u.getRef();
        if (ref != null) {
            path += '#" + ref;
        }
        port = u.getPort();
        if( port == -1 ) {
            port = getDefaultPort();
        }
        setURL( u, "smb", u.getHost(), port,
                    u.getAuthority(), u.getUserInfo(),
                    path, u.getQuery(), null );