Package org.apache.iceberg.encryption
Class EncryptingFileIO
- java.lang.Object
-
- org.apache.iceberg.encryption.EncryptingFileIO
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Serializable,java.lang.AutoCloseable,FileIO
public class EncryptingFileIO extends java.lang.Object implements FileIO, java.io.Serializable
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,InputFile>bulkDecrypt(java.lang.Iterable<? extends ContentFile<?>> files)voidclose()Close File IO to release underlying resources.static EncryptingFileIOcombine(FileIO io, EncryptionManager em)voiddeleteFile(java.lang.String path)Delete the file at the given path.EncryptionManagerencryptionManager()InputFilenewDecryptingInputFile(java.lang.String path, long length, java.nio.ByteBuffer buffer)InputFilenewDecryptingInputFile(java.lang.String path, java.nio.ByteBuffer buffer)EncryptedOutputFilenewEncryptingOutputFile(java.lang.String path)InputFilenewInputFile(java.lang.String path)Get aInputFileinstance to read bytes from the file at the given path.InputFilenewInputFile(java.lang.String path, long length)Get aInputFileinstance to read bytes from the file at the given path, with a known file length.InputFilenewInputFile(DataFile file)InputFilenewInputFile(DeleteFile file)InputFilenewInputFile(ManifestFile manifest)OutputFilenewOutputFile(java.lang.String path)Get aOutputFileinstance to write bytes to the file at the given path.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.iceberg.io.FileIO
deleteFile, deleteFile, initialize, properties
-
-
-
-
Method Detail
-
combine
public static EncryptingFileIO combine(FileIO io, EncryptionManager em)
-
bulkDecrypt
public java.util.Map<java.lang.String,InputFile> bulkDecrypt(java.lang.Iterable<? extends ContentFile<?>> files)
-
encryptionManager
public EncryptionManager encryptionManager()
-
newInputFile
public InputFile newInputFile(java.lang.String path)
Description copied from interface:FileIOGet aInputFileinstance to read bytes from the file at the given path.- Specified by:
newInputFilein interfaceFileIO
-
newInputFile
public InputFile newInputFile(java.lang.String path, long length)
Description copied from interface:FileIOGet aInputFileinstance to read bytes from the file at the given path, with a known file length.- Specified by:
newInputFilein interfaceFileIO
-
newInputFile
public InputFile newInputFile(DataFile file)
- Specified by:
newInputFilein interfaceFileIO
-
newInputFile
public InputFile newInputFile(DeleteFile file)
- Specified by:
newInputFilein interfaceFileIO
-
newInputFile
public InputFile newInputFile(ManifestFile manifest)
- Specified by:
newInputFilein interfaceFileIO
-
newDecryptingInputFile
public InputFile newDecryptingInputFile(java.lang.String path, java.nio.ByteBuffer buffer)
-
newDecryptingInputFile
public InputFile newDecryptingInputFile(java.lang.String path, long length, java.nio.ByteBuffer buffer)
-
newOutputFile
public OutputFile newOutputFile(java.lang.String path)
Description copied from interface:FileIOGet aOutputFileinstance to write bytes to the file at the given path.- Specified by:
newOutputFilein interfaceFileIO
-
newEncryptingOutputFile
public EncryptedOutputFile newEncryptingOutputFile(java.lang.String path)
-
deleteFile
public void deleteFile(java.lang.String path)
Description copied from interface:FileIODelete the file at the given path.- Specified by:
deleteFilein interfaceFileIO
-
close
public void close()
Description copied from interface:FileIOClose File IO to release underlying resources.Calling this method is only required when this FileIO instance is no longer expected to be used, and the resources it holds need to be explicitly released to avoid resource leaks.
-
-