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

com.github.vfss3.operations.MD5HashGetter Maven / Gradle / Ivy

The newest version!
package com.github.vfss3.operations;

import com.github.vfss3.S3FileObject;
import org.apache.commons.vfs2.FileSystemException;

/**
 * @author Alexey Abashev
 */
public class MD5HashGetter implements IMD5HashGetter {
    private final S3FileObject file;

    /**
     * @param file
     */
    public MD5HashGetter(S3FileObject file) {
        this.file = file;
    }

    /* (non-Javadoc)
     * @see com.intridea.io.vfs.operations.IMD5HashGetter#getMD5Hash()
     */
    @Override
    public String getMD5Hash() throws FileSystemException {
        return file.getMD5Hash().orElse(null);
    }

    /* (non-Javadoc)
     * @see org.apache.commons.vfs.operations.FileOperation#process()
     */
    @Override
    public void process() throws FileSystemException {

        // Do nothing
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy