|
|||||||||
| Home >> All >> reeb >> [ lazysync overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
reeb.lazysync
Class LazySyncServer

java.lang.Objectreeb.lazysync.LazySyncServer
- public class LazySyncServer
- extends java.lang.Object
LazySync server for desktop running
| Field Summary | |
private static int |
DEFAULT_PORT
The port number to listen on |
private static java.lang.String |
VERSION
The version number |
| Constructor Summary | |
LazySyncServer()
|
|
| Method Summary | |
private static void |
createDir(java.io.BufferedReader reader,
java.io.PrintWriter writer,
java.io.File syncDir)
Creates the specified directory |
private static void |
deleteFile(java.io.BufferedReader reader,
java.io.PrintWriter writer,
java.io.File syncDir)
Deletes the specified file |
private static java.io.File |
getAbsoluteFile(java.io.File root,
java.lang.String relPath)
Returns the path for a file based upon absolute root and relative path |
private static void |
getDirList(java.io.BufferedReader reader,
java.io.PrintWriter writer,
java.io.File syncDir)
Returns the file list |
private static void |
getFileData(java.net.Socket socket,
java.io.BufferedReader reader,
java.io.PrintWriter writer,
java.io.File syncDir,
int portNum)
Returns file data as a binary stream to client |
private static void |
getFileInfo(java.io.BufferedReader reader,
java.io.PrintWriter writer,
java.io.File syncDir)
Returns file type (dir/file), file size and last modified date (as long) |
private static void |
getLastSyncData(java.io.BufferedReader reader,
java.io.PrintWriter writer,
java.io.File syncDir)
Returns the last sync data if available |
static void |
main(java.lang.String[] args)
Main entry point |
private static java.lang.String |
mangleClientSyncDir(java.lang.String clientSyncDir)
Mangles a passed client sync dir to create the server sync dir |
private static void |
putFileData(java.net.Socket socket,
java.io.BufferedReader reader,
java.io.PrintWriter writer,
java.io.File syncDir,
int portNum)
Writes file data |
private static void |
setLastSyncData(java.io.BufferedReader reader,
java.io.PrintWriter writer,
java.io.File syncDir)
Sets the last sync data |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
VERSION
private static final java.lang.String VERSION
- The version number
- See Also:
- Constant Field Values
DEFAULT_PORT
private static final int DEFAULT_PORT
- The port number to listen on
- See Also:
- Constant Field Values
| Constructor Detail |
LazySyncServer
public LazySyncServer()
| Method Detail |
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- Main entry point
setLastSyncData
private static void setLastSyncData(java.io.BufferedReader reader, java.io.PrintWriter writer, java.io.File syncDir) throws java.lang.Exception
- Sets the last sync data
getLastSyncData
private static void getLastSyncData(java.io.BufferedReader reader, java.io.PrintWriter writer, java.io.File syncDir) throws java.lang.Exception
- Returns the last sync data if available
mangleClientSyncDir
private static java.lang.String mangleClientSyncDir(java.lang.String clientSyncDir) throws java.lang.Exception
- Mangles a passed client sync dir to create the server sync dir
createDir
private static void createDir(java.io.BufferedReader reader, java.io.PrintWriter writer, java.io.File syncDir) throws java.lang.Exception
- Creates the specified directory
deleteFile
private static void deleteFile(java.io.BufferedReader reader, java.io.PrintWriter writer, java.io.File syncDir) throws java.lang.Exception
- Deletes the specified file
putFileData
private static void putFileData(java.net.Socket socket, java.io.BufferedReader reader, java.io.PrintWriter writer, java.io.File syncDir, int portNum) throws java.lang.Exception
- Writes file data
getFileData
private static void getFileData(java.net.Socket socket, java.io.BufferedReader reader, java.io.PrintWriter writer, java.io.File syncDir, int portNum) throws java.lang.Exception
- Returns file data as a binary stream to client
getFileInfo
private static void getFileInfo(java.io.BufferedReader reader, java.io.PrintWriter writer, java.io.File syncDir) throws java.lang.Exception
- Returns file type (dir/file), file size and last modified date (as long)
getDirList
private static void getDirList(java.io.BufferedReader reader, java.io.PrintWriter writer, java.io.File syncDir) throws java.lang.Exception
- Returns the file list
getAbsoluteFile
private static java.io.File getAbsoluteFile(java.io.File root, java.lang.String relPath) throws java.lang.Exception
- Returns the path for a file based upon absolute root and relative path
|
|||||||||
| Home >> All >> reeb >> [ lazysync overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
reeb.lazysync.LazySyncServer