Package io.milton.zsync
Class ZSyncClient
java.lang.Object
io.milton.zsync.ZSyncClient
- All Implemented Interfaces:
FileSyncer
- Author:
- bradm
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondownload(Host host, Path remotePath, File localFile, ProgressListener listener) intvoidsetBlocksize(int blocksize) voidupload(Host host, File localcopy, Path remotePath, ProgressListener listener)
-
Constructor Details
-
ZSyncClient
-
-
Method Details
-
download
public File download(Host host, Path remotePath, File localFile, ProgressListener listener) throws IOException, NotFoundException, HttpException, NotAuthorizedException, BadRequestException, ConflictException - Specified by:
downloadin interfaceFileSyncer- Parameters:
host-remotePath-downloadTo-- Returns:
- - the assembled file, which probably needs to be moved to replace the previous file
- Throws:
IOExceptionHttpExceptionNotFoundException- - if the remote file does not existNotAuthorizedExceptionBadRequestExceptionConflictException
-
upload
public void upload(Host host, File localcopy, Path remotePath, ProgressListener listener) throws IOException, NotFoundException, NotAuthorizedException, ConflictException - Specified by:
uploadin interfaceFileSyncer- Parameters:
host-localcopy-remotePath-- Throws:
IOExceptionHttpExceptionNotFoundExceptionNotAuthorizedExceptionConflictException
-
getBlocksize
public int getBlocksize() -
setBlocksize
public void setBlocksize(int blocksize)
-