@Override public URLStreamHandler getUrlHandler () { if ( this.wrappedHandler == null ) { this.wrappedHandler = new Handler(this); } return this.wrappedHandler; }
@Override public URLConnection openConnection ( URL u ) throws IOException { if ( log.isDebugEnabled() ) { log.debug("Opening file " + u); } return new SmbFile(u, getTransportContext()); }
protected void parseURL( URL u, 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 ); } }
protected void parseURL( URL u, 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 ); } }
@Override protected void parseURL ( URL u, 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); } }
@Override protected void parseURL ( URL u, 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); } }
@Override public URLStreamHandler getUrlHandler () { if ( this.wrappedHandler == null ) { this.wrappedHandler = new Handler(this); } return this.wrappedHandler; }
@Override public URLConnection openConnection ( URL u ) throws IOException { if ( log.isDebugEnabled() ) { log.debug("Opening file " + u); } return new SmbFile(u, getTransportContext()); }
protected void parseURL( URL u, 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 ); } }
/** * Construct a context * * @param config * configuration for the context * */ public BaseContext ( Configuration config ) { this.config = config; this.dfs = new DfsImpl(this); this.sidResolver = new SIDCacheImpl(this); this.urlHandler = new Handler(this); this.nameServiceClient = new NameServiceClientImpl(this); this.bufferCache = new BufferCacheImpl(this.config); this.transportPool = new SmbTransportPoolImpl(); this.defaultCredentials = new NtlmPasswordAuthenticator(); }
protected void parseURL( URL u, 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 ); } }
/** * Construct a context * * @param config * configuration for the context * */ public BaseContext ( Configuration config ) { this.config = config; this.dfs = new DfsImpl(this); this.sidResolver = new SIDCacheImpl(this); this.urlHandler = new Handler(this); this.nameServiceClient = new NameServiceClientImpl(this); this.bufferCache = new BufferCacheImpl(this.config); this.transportPool = new SmbTransportPoolImpl(); this.defaultCredentials = new NtlmPasswordAuthenticator(); }