Package org.apache.iceberg.io
Interface InputFile
- All Known Subinterfaces:
NativeEncryptionInputFile
- All Known Implementing Classes:
AesGcmInputFile
,HadoopInputFile
,InMemoryInputFile
,S3InputFile
public interface InputFile
An interface used to read input files using
SeekableInputStream
instances.
This class is based on Parquet's InputFile.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
exists()
Checks whether the file exists.long
Returns the total length of the file, in byteslocation()
The fully-qualified location of the input file as a String.Opens a newSeekableInputStream
for the underlying data file
-
Method Details
-
getLength
long getLength()Returns the total length of the file, in bytes- Returns:
- the total length of the file, in bytes
- Throws:
RuntimeIOException
- If the implementation throws anIOException
-
newStream
SeekableInputStream newStream()Opens a newSeekableInputStream
for the underlying data file- Returns:
- a seekable stream for reading the file
- Throws:
NotFoundException
- If the file does not existRuntimeIOException
- If the implementation throws anIOException
-
location
String location()The fully-qualified location of the input file as a String.- Returns:
- the input file location
-
exists
boolean exists()Checks whether the file exists.- Returns:
- true if the file exists, false otherwise
-