Examples of UrlResource


Examples of org.jboss.forge.addon.resource.URLResource

   }

   @Test(expected = IllegalArgumentException.class)
   public void testResourceMonitorShouldThrowIllegalArgumentOnUnsupportedResource() throws Exception
   {
      URLResource resource = resourceFactory.create(URLResource.class, new URL("http://forge.jboss.org"));
      Assert.assertNotNull(resource);
      monitor = resourceFactory.monitor(resource);
   }
View Full Code Here

Examples of org.jboss.forge.resources.URLResource

         {
            idx = length;
         }
         try
         {
            r = new URLResource(factory, new URL(path.substring(0, idx)));
         }
         catch (MalformedURLException e)
         {
            throw new RuntimeException(e);
         }
View Full Code Here

Examples of org.linkedin.util.io.resource.URLResource

                           uri.getPort(),
                           getFullPath(path),
                           null,
                           null);

      return new URLResource(this, path, newURI.toURL(), _connectTimeout, _readTimeout);
    }
    catch(URISyntaxException e)
    {
      // should not happen
      throw new RuntimeException(e);
View Full Code Here

Examples of org.mortbay.resource.URLResource

            }
        }
       
        try {
            URL url = new URL(documentRoot + "/" + pathInContext);
            return new URLResource(url, url.openConnection()) {
                private static final long serialVersionUID = 8560952113883507717L;
               
                @Override
                public File getFile() throws IOException {
                    return null;
View Full Code Here

Examples of org.raptorjs.resources.URLResource

    }
   
    if (urls != null) {
      while (urls.hasMoreElements()) {
          URL url = urls.nextElement();
          Resource resource = new URLResource(path, this, fullPath, url, true);
          callback.resourceFound(resource);
        }
    }
    }
View Full Code Here

Examples of org.richfaces.resource.URLResource

        for (ResourceMapper mapper : mappers) {
            ResourceMapping mapping = mapper.mapResource(resourceKey);

            if (mapping != null) {
                ResourcePath path = mapping.getResourcePath(context);
                return new URLResource(path);
            }
        }

        return null;
    }
View Full Code Here

Examples of org.springframework.core.io.UrlResource

                    String str = "http://timefinder.sourceforge.net/files/comp-2007-2-09.tim";
                    bar.setMessage(tr.get("downloadFrom", str));
                    // why does decompressing not work?? -> first line == null !?
                    // reader = new InputStreamReader(new ZipInputStream(
                    //          new UrlResource("http://timefinder.sourceforge.net/files/comp-2007-2-09.zip").getInputStream()));
                    reader = new InputStreamReader(new UrlResource(str).getInputStream());
                    bar.setMessage("");
                }

                track2allData.setSource(reader);
                track2allData.setStatusBar(new StatusBarBridge(bar));
View Full Code Here

Examples of org.springframework.core.io.UrlResource

                int resultDownload = JOptionPane.showConfirmDialog(null, tr.get(ID + ".downloadQuestion"),
                        tr.get(ID + ".downloadQuestion"), JOptionPane.YES_NO_OPTION);
                if (resultDownload == JOptionPane.YES_OPTION) {
                    String str = "http://peat_hal.users.sourceforge.net/sessions_catalog.j1";
                    bar.setMessage(tr.get("downloadFrom", str));
                    istream = new UrlResource(str).getInputStream();
                    pm.worked(5);
                    bar.setMessage("");
                }

                pm.taskStarted(tr.get(ID + ".startTask"), -1);
View Full Code Here

Examples of org.springframework.core.io.UrlResource

    {
      log.debug("Creating Spring beans factory for extensions registry "
          + registryId + " using "+ resourceLocation);
    }
   
    return new XmlBeanFactory(new UrlResource(resourceLocation));
  }
View Full Code Here

Examples of org.springframework.core.io.UrlResource

        if (null == beanFactories) {
            beanFactories = new HashMap<UrlResource, CeltixXmlBeanFactory>();
        }

        CeltixXmlBeanFactory beanFactory =  null;
        UrlResource urlRes = getBeanDefinitionsResource();
        if (null != urlRes) {
            if (!beanFactories.containsKey(urlRes)) {

                if (null != urlRes) {
                    try {
                        beanFactory = new CeltixXmlBeanFactory(urlRes);
                    } catch (BeansException ex) {
                        // continue without using configuration from the bean definitions
                        LOG.log(Level.WARNING, new Message("BEAN_FACTORY_CREATION_MSG", LOG, urlRes
                                                           .toString()).toString(), ex);
                    }
                    beanFactories.put(urlRes, beanFactory);
                }
            } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.