com.mebigfatguy.polycasso
Class URLFetcher

java.lang.Object
  extended by com.mebigfatguy.polycasso.URLFetcher

public class URLFetcher
extends java.lang.Object

manages downloading data from a url


Method Summary
static byte[] fetchURLData(java.lang.String url)
          retrieve arbitrary data found at a specific url - either http or file urls for http requests, sets the user-agent to mozilla to avoid sites being cranky about a java sniffer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fetchURLData

public static byte[] fetchURLData(java.lang.String url)
                           throws java.io.IOException
retrieve arbitrary data found at a specific url - either http or file urls for http requests, sets the user-agent to mozilla to avoid sites being cranky about a java sniffer

Parameters:
url - the url to retrieve
Returns:
a byte array of the content
Throws:
java.io.IOException - the site fails to respond


Copyright © 2009-2010 MeBigFatGuy.com. All Rights Reserved.