@Test public void testLoadResource() throws Exception { final String name = "test"; ClasspathResources jarResources = getClasspathResources(name); URL resourceURL = jarResources.getResourceURL("test.properties"); Properties props = getProperties(resourceURL); assertEquals("testval", props.getProperty("testkey")); }
public void loadResource(URL url) { try { loadResource( new File( url.toURI() ), "" ); } catch (IllegalArgumentException iae) { loadRemoteResource( url ); } catch (URISyntaxException e) { throw new JclException( "URISyntaxException", e ); } }
ClasspathResources extends JarResources { public void loadResource(URL url) { try { loadResource( new File( url.toURI() ), "" ); } catch (IllegalArgumentException iae) { loadRemoteResource( url ); } catch (URISyntaxException e) { throw new JclException( "URISyntaxException", e ); } } }
ClasspathResources extends JarResources { public void loadResource(URL url) { try { loadResource( new File( url.toURI() ), "" ); } catch (IllegalArgumentException iae) { loadRemoteResource( url ); } catch (URISyntaxException e) { throw new JclException( "URISyntaxException", e ); } } ClasspathResources(); }
ClasspathResources extends JarResources { public void loadResource(URL url) { try { loadResource( new File( url.toURI() ), "" ); } catch (IllegalArgumentException iae) { loadRemoteResource( url ); } catch (URISyntaxException e) { throw new JclException( "URISyntaxException", e ); } } ClasspathResources(); void loadResource(URL url); void loadResource(String path); void unload(String resource); boolean isCollisionAllowed(); void setCollisionAllowed(boolean collisionAllowed); boolean isIgnoreMissingResources(); void setIgnoreMissingResources(boolean ignoreMissingResources); }
ClasspathResources extends JarResources { public void loadResource(URL url) { try { loadResource( new File( url.toURI() ), "" ); } catch (IllegalArgumentException iae) { loadRemoteResource( url ); } catch (URISyntaxException e) { throw new JclException( "URISyntaxException", e ); } } ClasspathResources(); void loadResource(URL url); void loadResource(String path); void unload(String resource); boolean isCollisionAllowed(); void setCollisionAllowed(boolean collisionAllowed); boolean isIgnoreMissingResources(); void setIgnoreMissingResources(boolean ignoreMissingResources);  }