public Image grabImge(String url)
{
InputStream is = null;
	HttpConnection hc = null;
	Image img = null;
    	try {
    	hc = (HttpConnection)Connector.open(url);	
	// If we've got a connectionů
     	if (hc.getResponseCode() == HttpConnection.HTTP_OK) {
		// Open the stream
		is = hc.openInputStream();
		// How big is the file?
int len = (int)hc.getLength();
// Create a byte array that size
		byte[] data = new byte[len];
		// Read in the file
		int actual = is.read(data);
		// Create an image from the raw data
		img = Image.createImage(data, 0, len);
	}
} catch (Exception e) {
		System.out.println("IO Exception+"+e);
	} finally {
 	      if (is != null) {
	    	try {
			is.close();
		}
		catch (Exception e) { }
		}
	      if (c != null)
	      {
   	    	try {
			c.close();
		}
		catch (Exception e) { }
	}
	return img;
}