com.partnersoft.net
Class NetworkLib

java.lang.Object
  extended by com.partnersoft.net.NetworkLib
All Implemented Interfaces:
Lib

public class NetworkLib
extends java.lang.Object
implements Lib


Constructor Summary
NetworkLib()
           
 
Method Summary
static long download(java.lang.String sourceUrl, VfsFile destination)
           
static long download(java.net.URL source, VfsFile destination)
          Downloads a file from URL source to File destination.
static java.net.InetAddress localAddress()
          Returns the InetAddress of this machine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkLib

public NetworkLib()
Method Detail

localAddress

public static java.net.InetAddress localAddress()
Returns the InetAddress of this machine.


download

public static long download(java.net.URL source,
                            VfsFile destination)
                     throws java.io.IOException
Downloads a file from URL source to File destination. Creates directories if needed. Returns number of bytes copied.

Throws:
java.io.IOException

download

public static long download(java.lang.String sourceUrl,
                            VfsFile destination)
                     throws java.io.IOException
Throws:
java.io.IOException