Package us.monoid.web

Examples of us.monoid.web.Resty


//    assertTrue(ggBridge.contains("Golden Gate Bridge"));
//  }
// 
  @Test
  public void testStaticMap() throws Exception {
    Resty r = new Resty();
    File f = r.bytes("http://maps.google.com/maps/api/staticmap?size=512x512&maptype=hybrid" +
        "&markers=size:mid%7Ccolor:red%7C37.815649,-122.477646&sensor=false").save(File.createTempFile("google", ".png"));
    System.out.println(f.toURI());
    f.delete();
  }
View Full Code Here


    ExecutorService pool = Executors.newFixedThreadPool(10);
    List<Callable<File>> tasks = new ArrayList<Callable<File>>(args.length);
    for (final String url : args) {
      tasks.add(new Callable<File>() {
        public File call() throws Exception {
          return new Resty().bytes(url).save(File.createTempFile("img", ".png"));
        }       
      });
    }
    List<Future<File>> results = pool.invokeAll(tasks);
    for (Future<File> ff : results) {
View Full Code Here

TOP

Related Classes of us.monoid.web.Resty

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.