.getDefaultStore( );
CloudProvider defaultProvider = cloudloop
.getProvider( defaultProviderName );
if (defaultProvider == null)
{
throw new InvalidPathException(
"Default provider 'null' is not valid." );
}
// normalize to *nix path convention
path = path.replace( '\\', '/' );
try
{
_underlying = new URI( path , false );
_underlying.normalize( );
if (_underlying.getAuthority( ) == null)
{
_provider = defaultProvider;
_underlying = new URI( _underlying.getScheme( ) , _underlying
.getUserinfo( ) , defaultProvider.getCloudloopToken( ) ,
_underlying.getPort( ) , _underlying.getPath( ) ,
_underlying.getQuery( ) , _underlying.getFragment( ) );
} else
{
ProviderFactory providerFactory = cloudloop
.getProviderFactory( );
String providerToken = _underlying.getAuthority( );
ProviderConfig providerConfig = CloudloopConfigLoader
.extractProviderConfig( config, providerToken,
providerFactory );
_provider = providerFactory.createProvider( providerConfig );
}
} catch (URIException e)
{
throw new InvalidPathException( "Error parsing path '" + path
+ "'. " + e.getMessage( ) + "." );
}
}