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)
void
close()
Close File IO to release underlying resources.static EncryptingFileIO
combine(FileIO io, EncryptionManager em)
void
deleteFile(java.lang.String path)
Delete the file at the given path.EncryptionManager
encryptionManager()
InputFile
newDecryptingInputFile(java.lang.String path, long length, java.nio.ByteBuffer buffer)
InputFile
newDecryptingInputFile(java.lang.String path, java.nio.ByteBuffer buffer)
EncryptedOutputFile
newEncryptingOutputFile(java.lang.String path)
InputFile
newInputFile(java.lang.String path)
Get aInputFile
instance to read bytes from the file at the given path.InputFile
newInputFile(java.lang.String path, long length)
Get aInputFile
instance to read bytes from the file at the given path, with a known file length.InputFile
newInputFile(DataFile file)
InputFile
newInputFile(DeleteFile file)
InputFile
newInputFile(ManifestFile manifest)
OutputFile
newOutputFile(java.lang.String path)
Get aOutputFile
instance 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:FileIO
Get aInputFile
instance to read bytes from the file at the given path.- Specified by:
newInputFile
in interfaceFileIO
-
newInputFile
public InputFile newInputFile(java.lang.String path, long length)
Description copied from interface:FileIO
Get aInputFile
instance to read bytes from the file at the given path, with a known file length.- Specified by:
newInputFile
in interfaceFileIO
-
newInputFile
public InputFile newInputFile(DataFile file)
- Specified by:
newInputFile
in interfaceFileIO
-
newInputFile
public InputFile newInputFile(DeleteFile file)
- Specified by:
newInputFile
in interfaceFileIO
-
newInputFile
public InputFile newInputFile(ManifestFile manifest)
- Specified by:
newInputFile
in 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:FileIO
Get aOutputFile
instance to write bytes to the file at the given path.- Specified by:
newOutputFile
in interfaceFileIO
-
newEncryptingOutputFile
public EncryptedOutputFile newEncryptingOutputFile(java.lang.String path)
-
deleteFile
public void deleteFile(java.lang.String path)
Description copied from interface:FileIO
Delete the file at the given path.- Specified by:
deleteFile
in interfaceFileIO
-
close
public void close()
Description copied from interface:FileIO
Close 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.
-
-