public class UFTPClient extends AbstractUFTPClient implements Runnable
Constructor and Description |
---|
UFTPClient(InetAddress[] servers,
int port,
InputStream source)
create a new UFTP client for writing data to the given server, which is
read from the specified source
|
UFTPClient(InetAddress[] servers,
int port,
OutputStream target)
create a new UFTP client for reading data from the given server and
writing it to the specified target
|
UFTPClient(InetAddress[] servers,
int port,
String fileName,
boolean send,
boolean append)
create a new UFTP client for file transfer from/to the given server
|
Modifier and Type | Method and Description |
---|---|
long |
getFinalTransferRate()
after the transfer has finished, this will reflect the net transfer rate
in bytes per second
|
static void |
main(String[] args)
runs a UFTP data transfer
|
static String |
makeCommandline(String host,
int port,
String localFile,
boolean sendData,
String secret,
int numStreams,
String encryptionKey,
boolean append,
boolean compress)
create a correct commandline for passing the given parameters to a
UFTPClient
|
static String |
makeCommandline(String host,
int port,
String localFile,
boolean sendData,
String secret,
int numStreams,
String encryptionKey,
boolean append,
boolean compress,
int bufferSize)
create a correct commandline for passing the given parameters to a
UFTPClient
|
void |
run() |
cancel, cleanup, closeData, connect, createSocket, createSocket, getAuthtimeout, getBufferSize, getKey, getNumConnections, getProgressListener, getSecret, getServerFeatures, getServerList, getTimeout, isCompress, isConnected, openDataConnection, prepareGet, preparePut, setAuthtimeout, setBufferSize, setCompress, setKey, setNumConnections, setProgressListener, setSecret, setTimeout
public UFTPClient(InetAddress[] servers, int port, String fileName, boolean send, boolean append) throws FileNotFoundException
servers
- - list of alternative IP addresses of the UFTP serverport
- - the server portfileName
- - the local file namesend
- - true
if data should be sentappend
- - true
if data (in receive mode) should be
appended to the local fileFileNotFoundException
public UFTPClient(InetAddress[] servers, int port, InputStream source) throws IOException
servers
- - list of alternative IP addresses of the UFTP serverport
- - UFTP portsource
- - input stream for reading data fromIOException
public UFTPClient(InetAddress[] servers, int port, OutputStream target) throws IOException
servers
- - list of alternative IP addresses of the UFTP serverport
- - UFTP porttarget
- - output stream for writing data toIOException
public long getFinalTransferRate()
public static void main(String[] args) throws Exception
args
- Exception
public static String makeCommandline(String host, int port, String localFile, boolean sendData, String secret, int numStreams, String encryptionKey, boolean append, boolean compress, int bufferSize)
host
- - server host (can be a comma separated list of addresses)port
- - server portlocalFile
- - local file namesendData
- - true
if client should send datasecret
- - the secretnumStreams
- - the number of streamsencryptionKey
- - encryption key (base64), if null
, no
encryption will be usedappend
- - whether to append to an existing filebufferSize
- - file read/write buffer in kbytes (default 128)public static String makeCommandline(String host, int port, String localFile, boolean sendData, String secret, int numStreams, String encryptionKey, boolean append, boolean compress)
host
- - server host (can be a comma separated list of addresses)port
- - server portlocalFile
- - local file namesendData
- - true
if client should send datasecret
- - the secretnumStreams
- - the number of streamsencryptionKey
- - encryption key (base64), if null
, no
encryption will be usedappend
- - whether to append to an existing fileCopyright © 2010–2016 UNICORE. All rights reserved.