com.github.vfss3.operations.ServerSideEncryptionImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vfs-s3-with-awssdk-v1 Show documentation
Show all versions of vfs-s3-with-awssdk-v1 Show documentation
Amazon S3 driver for VFS (Apache Commons Virtual File System)
The newest version!
package com.github.vfss3.operations;
import com.github.vfss3.S3FileObject;
import org.apache.commons.vfs2.FileSystemException;
/**
* @author Alexey Abashev
*/
class ServerSideEncryptionImpl implements ServerSideEncryption {
private final S3FileObject file;
ServerSideEncryptionImpl(S3FileObject file) {
this.file = file;
}
@Override
public boolean noEncryption() throws FileSystemException {
return !file.getSSEAlgorithm().isPresent();
}
@Override
public boolean encryptedWith(String algorithm) throws FileSystemException {
return file.getSSEAlgorithm().filter(a -> a.equals(algorithm)).isPresent();
}
@Override
public void process() throws FileSystemException {
}
}