Package org.apache.commons.vfs2.provider.url

Examples of org.apache.commons.vfs2.provider.url.UrlFileProvider


public class FastJarFileProviderTest {

  @Test
  public void test() throws FileSystemException, URISyntaxException {
    DefaultFileSystemManager fsm = new DefaultFileSystemManager();
    fsm.setDefaultProvider(new UrlFileProvider());
    fsm.addProvider("file", new DefaultLocalFileProvider());
    fsm.addProvider("jar", new FastJarFileProvider());
    fsm.init();

    String jarUri = getClass().getResource("/jarfiletest.jar").toURI().toString();
View Full Code Here


    }
  }

  public static FileSystemManager getMinimalFileSystemManager() throws FileSystemException {
    DefaultFileSystemManager fsm = new DefaultFileSystemManager();
    fsm.setDefaultProvider(new UrlFileProvider());
    fsm.addProvider("file", new DefaultLocalFileProvider());
    fsm.addProvider("jar", new FastJarFileProvider());
    fsm.init();
    return fsm;
  }
View Full Code Here

    @Override
    public void prepare(DefaultFileSystemManager manager)
        throws Exception
    {
        manager.addProvider("res", new ResourceFileProvider());
        manager.addProvider("file", new UrlFileProvider());
        manager.addProvider("jar", new JarFileProvider());
    }
View Full Code Here

     */
    @Override
    public void prepare(final DefaultFileSystemManager manager)
        throws Exception
    {
        manager.addProvider("file", new UrlFileProvider());
    }
View Full Code Here

     */
    @Override
    public void prepare(final DefaultFileSystemManager manager)
        throws Exception
    {
        manager.addProvider("http", new UrlFileProvider());
    }
View Full Code Here

     */
    @Override
    public void prepare(final DefaultFileSystemManager manager)
        throws Exception
    {
        manager.addProvider("http", new UrlFileProvider());
    }
View Full Code Here

    extends AbstractProviderTestConfig
    implements ProviderTestConfig
{
    public static Test suite() throws Exception
    {
        CacheTestSuite suite = new CacheTestSuite(new org.apache.commons.vfs2.cache.NullFilesCacheTestCase());
        suite.addTests(NullFilesCacheTests.class);
        return suite;
    }
View Full Code Here

    extends AbstractProviderTestConfig
    implements ProviderTestConfig
{
    public static Test suite() throws Exception
    {
        CacheTestSuite suite = new CacheTestSuite(new LRUFilesCacheTestCase());
        suite.addTests(LRUFilesCacheTests.class);
        return suite;
    }
View Full Code Here

    /**
     * Creates the test suite for the ram file system.
     */
    public static Test suite() throws Exception
    {
        return new ProviderTestSuite(new RamProviderTestCase());
    }
View Full Code Here

    private static final String TEST_URI = "test.http.uri";
    public static Test suite() throws Exception
    {
        if (System.getProperty(TEST_URI) != null)
        {
            return new ProviderTestSuite(new HttpProviderTestCase());
        }
        else
        {
            return notConfigured(HttpProviderTestCase.class);
        }
View Full Code Here

TOP

Related Classes of org.apache.commons.vfs2.provider.url.UrlFileProvider

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.