Package com.aoindustries.io
Class SyncFile
- java.lang.Object
-
- com.aoindustries.io.SyncFile
-
public class SyncFile extends Object
Copies one file to another, only writing the blocks of the destination file if they either didn't already exist or contain different content. This is to update flash media where reads are much faster than reads.- Author:
- AO Industries, Inc.
-
-
Constructor Summary
Constructors Constructor Description SyncFile()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] args)static longsyncFile(InputStream in, RandomAccessFile out)Synchronized the input to the provided output, only writing data that doesn't already match the input.
-
-
-
Method Detail
-
main
public static void main(String[] args)
-
syncFile
public static long syncFile(InputStream in, RandomAccessFile out) throws IOException
Synchronized the input to the provided output, only writing data that doesn't already match the input. Returns the number of bytes written.- Throws:
IOException
-
-