Package org.syncany.operations

Examples of org.syncany.operations.Assembler


      FileContent fileContent = localDatabase.getFileContent(fileVersion.getChecksum(), true);
      Map<ChunkChecksum, MultiChunkId> multiChunks = localDatabase.getMultiChunkIdsByChecksums(fileContent.getChunks());

      TransferManager transferManager = config.getTransferPlugin().createTransferManager(config.getConnection(), config);
      Downloader downloader = new Downloader(config, transferManager);
      Assembler assembler = new Assembler(config, localDatabase);

      downloader.downloadAndDecryptMultiChunks(new HashSet<MultiChunkId>(multiChunks.values()));

      File tempFile = assembler.assembleToCache(fileVersion);
      String tempFileToken = StringUtil.toHex(ObjectId.secureRandomBytes(40));
     
      GetFileFolderResponse fileResponse = new GetFileFolderResponse(concreteRequest.getId(), concreteRequest.getRoot(), tempFileToken);
      GetFileFolderResponseInternal fileResponseInternal = new GetFileFolderResponseInternal(fileResponse, tempFile);
View Full Code Here


    moveFileToFinalLocation(reconstructedFileInCache, reconstructedFileVersion)
  }
 
  protected File assembleFileToCache(FileVersion reconstructedFileVersion) throws Exception {
    SqlDatabase localDatabase = new SqlDatabase(config);
    Assembler assembler = new Assembler(config, localDatabase, winningDatabase);

    File reconstructedFileInCache = assembler.assembleToCache(reconstructedFileVersion);
    
    setFileAttributes(reconstructedFileVersion, reconstructedFileInCache);
    setLastModified(reconstructedFileVersion, reconstructedFileInCache);
   
    return reconstructedFileInCache;
View Full Code Here

TOP

Related Classes of org.syncany.operations.Assembler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.