org.tranche.project
Class BackupProjectTool

java.lang.Object
  extended by org.tranche.project.BackupProjectTool

public class BackupProjectTool
extends java.lang.Object

A tool for saving a project from the Tranche network to a disk drive. The project is saved in chunked data form, not as actual files. To retrieve the data once created, set up a Flat File Tranche Server on the directory.

Author:
James "Augie" Hill - augman85@gmail.com

Field Summary
 java.util.ArrayList<TrancheServer> downloadFromServers
          Servers from which to backup data.
 
Constructor Summary
BackupProjectTool(java.lang.String projectHash, java.math.BigInteger partitionSize, java.io.File rootLocation)
           
BackupProjectTool(java.lang.String projectHash, java.math.BigInteger partitionSize, java.io.File rootLocation, java.lang.String passphrase)
           
 
Method Summary
 void addOutput(java.io.PrintStream out)
          Add a PrintStream to collection; output statements will be printed to all PrintStream instances.
 void run()
          Executes the backup process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

downloadFromServers

public java.util.ArrayList<TrancheServer> downloadFromServers

Servers from which to backup data.

Constructor Detail

BackupProjectTool

public BackupProjectTool(java.lang.String projectHash,
                         java.math.BigInteger partitionSize,
                         java.io.File rootLocation)
                  throws java.lang.Exception
Parameters:
projectHash -
partitionSize -
rootLocation -
Throws:
java.lang.Exception

BackupProjectTool

public BackupProjectTool(java.lang.String projectHash,
                         java.math.BigInteger partitionSize,
                         java.io.File rootLocation,
                         java.lang.String passphrase)
                  throws java.lang.Exception
Parameters:
projectHash -
partitionSize -
rootLocation -
passphrase -
Throws:
java.lang.Exception
Method Detail

run

public void run()
         throws java.lang.Exception

Executes the backup process.

Throws:
java.lang.Exception

addOutput

public void addOutput(java.io.PrintStream out)

Add a PrintStream to collection; output statements will be printed to all PrintStream instances.

Parameters:
out -


This code is free for use both commercially and non-commercially as stated in the project's license