Package org.apache.iceberg.io
Interface OutputFile
- All Known Subinterfaces:
- NativeEncryptionOutputFile
- All Known Implementing Classes:
- AesGcmOutputFile,- HadoopOutputFile,- InMemoryOutputFile,- S3OutputFile
public interface OutputFile
An interface used to create output files using 
PositionOutputStream instances.
 This class is based on Parquet's InputFile.
- 
Method SummaryModifier and TypeMethodDescriptioncreate()Create a new file and return aPositionOutputStreamto it.Create a new file and return aPositionOutputStreamto it.location()Return the location this output file will create.Return anInputFilefor the location of this output file.
- 
Method Details- 
createPositionOutputStream create()Create a new file and return aPositionOutputStreamto it.If the file already exists, this will throw an exception. - Returns:
- an output stream that can report its position
- Throws:
- AlreadyExistsException- If the path already exists
- RuntimeIOException- If the implementation throws an- IOException
 
- 
createOrOverwritePositionOutputStream createOrOverwrite()Create a new file and return aPositionOutputStreamto it.If the file already exists, this will not throw an exception and will replace the file. - Returns:
- an output stream that can report its position
- Throws:
- RuntimeIOException- If the implementation throws an- IOException
- SecurityException- If staging directory creation fails due to missing JVM level permission
 
- 
locationString location()Return the location this output file will create.- Returns:
- the location of this output file
 
- 
toInputFileInputFile toInputFile()Return anInputFilefor the location of this output file.- Returns:
- an input file for the location of this output file
 
 
-