All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.oneandone.iocunitejb.simulators.sftpclient.upload.TmpFilePrefixUploadFileHandler Maven / Gradle / Ivy

There is a newer version: 2.0.50
Show newest version
package com.oneandone.iocunitejb.simulators.sftpclient.upload;

import java.nio.file.Paths;

/**
 * Sepcial {@link UploadFileHandler} to upload file to temporary file with file-prefix first and final rename it to target file
 */
public class TmpFilePrefixUploadFileHandler extends AbstractTmpUploadFileHandler implements UploadFileHandler {

    /**
     * see Telefonica Spec page 107, chapter 6.5.3
     */
    private static final String TMP_FILE_PREFIX = "tmp_";

    @Override
    public String getUploadFileName(String path, String fileName) {
        return Paths.get(WORK_FILE_DIRECTORY, path, TMP_FILE_PREFIX + fileName).toString();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy