Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

reeb.lazysync
Class FileTransfer  view FileTransfer download FileTransfer.java

java.lang.Object
  extended byreeb.lazysync.FileTransfer

public class FileTransfer
extends java.lang.Object

FileTransfer provides two methods for sending and receiving binary data as chunks


Field Summary
private static int BUFFER_SIZE
          Buffer size constant
 
Constructor Summary
FileTransfer()
           
 
Method Summary
static void receiveFile(java.net.Socket socket, java.io.File file, long fileSize, long timeStamp)
          Receives a file from a remote server
static void sendFile(java.net.Socket socket, java.io.File file)
          Sends a file to a remote server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUFFER_SIZE

private static final int BUFFER_SIZE
Buffer size constant

See Also:
Constant Field Values
Constructor Detail

FileTransfer

public FileTransfer()
Method Detail

sendFile

public static void sendFile(java.net.Socket socket,
                            java.io.File file)
                     throws java.lang.Exception
Sends a file to a remote server


receiveFile

public static void receiveFile(java.net.Socket socket,
                               java.io.File file,
                               long fileSize,
                               long timeStamp)
                        throws java.lang.Exception
Receives a file from a remote server