Package org.overlord.commons.osgi.vfs

Examples of org.overlord.commons.osgi.vfs.VfsBundle


            BundleContext bundleContext = FrameworkUtil.getBundle(getClass()).getBundleContext();
            ServiceReference serviceReference = bundleContext.getServiceReference(IVfsBundleFactory.class.getName());
            if (serviceReference == null)
                throw new RuntimeException("OSGi Service Reference for [IVfsBundleFactory] not found."); //$NON-NLS-1$
            IVfsBundleFactory vfsBundleFactory = (IVfsBundleFactory) bundleContext.getService(serviceReference);
            VfsBundle bundle = vfsBundleFactory.getVfsBundle(url);
            File vfsFile = bundle.asFile(url);
            try {
                if (vfsFile.isFile()) {
                    return new ZipDir(vfsFile.toURI().toURL());
                }
                if (vfsFile.isDirectory()) {
View Full Code Here

TOP

Related Classes of org.overlord.commons.osgi.vfs.VfsBundle

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.