com.funambol.syncclient.common
Class HttpTools

java.lang.Object
  extended by com.funambol.syncclient.common.HttpTools

public class HttpTools
extends java.lang.Object

This class supplies some methods of usefullness for the management of HTTP connection.

Version:
$Id: HttpTools.java,v 1.3 2007-12-22 18:09:17 nichele Exp $

Constructor Summary
HttpTools()
           
 
Method Summary
static byte[] downloadPackage(java.lang.String fileUrl)
          Download file from the given location.
static boolean isHTTPURL(java.lang.String url)
          Returns true if the given url is a valid http(s) url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpTools

public HttpTools()
Method Detail

downloadPackage

public static byte[] downloadPackage(java.lang.String fileUrl)
                              throws java.io.IOException
Download file from the given location.

Parameters:
fileUrl - location from which download the file.
Returns:
the content of the file downloaded.
Throws:
java.io.IOException - if an I/O error occurs.

isHTTPURL

public static boolean isHTTPURL(java.lang.String url)
Returns true if the given url is a valid http(s) url.

Parameters:
url - - NOT NULL
Returns:
true if urlis a valid http(s) url, false otherwise


Copyright © 2010 Funambol. All Rights Reserved.