Package com.cloudhopper.commons.rfs.provider

Examples of com.cloudhopper.commons.rfs.provider.BaseRemoteFileSystem


        if (protocol == null) {
            throw new MalformedURLException("Unsupported virtual filesystem protocol '" + url.getProtocol() + "'");
        }

        // create a new instance of the provider and return it
        BaseRemoteFileSystem vfs = null;
        try {
            Class vfsClass = protocol.getProvider();
            // create a new instance, cast it
            vfs = (BaseRemoteFileSystem)vfsClass.newInstance();
        } catch (Exception e) {
            throw new FileSystemException("Could not create instance of " + protocol.getProvider(), e);
        }

        // setup any common properties
        vfs.setURL(url);
        vfs.setProtocol(protocol);

        // validate the properties
        vfs.validateURL();

        return vfs;
    }
View Full Code Here

TOP

Related Classes of com.cloudhopper.commons.rfs.provider.BaseRemoteFileSystem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.