|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.metastatic.rsync.Rebuilder
Methods for file reconstruction from deltas.
| Constructor Summary | |
|---|---|
Rebuilder()
|
|
| Method Summary | |
|---|---|
static byte[] |
rebuild(byte[] buf,
List deltas)
Reconstruct data into a new byte array. |
static void |
rebuild(OutputStream out,
byte[] buf,
List deltas)
Reconstruct data into an output stream. |
static void |
rebuild(OutputStream out,
File oldFile,
List deltas)
Reconstruct a file into an output stream. |
static void |
rebuildFile(File oldFile,
File newFile,
List deltas)
Reconstruct a file into newFile. |
static File |
rebuildFile(File oldFile,
List deltas)
Reconstruct a file into a new file created with File.createTempFile(java.lang.String,java.lang.String,java.io.File).
|
static void |
rebuildFileInPlace(File file,
List deltas)
Reconstruct a file in-place. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Rebuilder()
| Method Detail |
public static byte[] rebuild(byte[] buf,
List deltas)
buf - The original data.deltas - The deltas to apply.
public static void rebuild(OutputStream out,
byte[] buf,
List deltas)
throws IOException
out - The sink for reconstructed data.buf - The original data.deltas - The deltas to apply.
IOException
public static void rebuild(OutputStream out,
File oldFile,
List deltas)
throws IOException
out - The sink for reconstructed data.oldFile - The original file.deltas - The deltas to apply.
IOException
public static File rebuildFile(File oldFile,
List deltas)
throws IOException
File.createTempFile(java.lang.String,java.lang.String,java.io.File).
This file can then be renamed to the destination.
oldFile - The original file.deltas - A collection of Deltas to apply to the original
file.
File containing the reconstruction.
IOException
public static void rebuildFile(File oldFile,
File newFile,
List deltas)
throws IOException
newFile.
oldFile - The original file.newFile - The file to write the reconstruction to. This must be a
different file than oldFiledeltas - The Deltas to apply.
IOException
public static void rebuildFileInPlace(File file,
List deltas)
throws IOException
file will be
overwritten with the contents of the reconstructed file.
file - The file to reconstruct.deltas - The Deltas to apply.
IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||