Package org.apache.iceberg.io
Interface InputFile
-
- All Known Implementing Classes:
HadoopInputFile
,S3InputFile
public interface InputFile
An interface used to read input files usingSeekableInputStream
instances.This class is based on Parquet's InputFile.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
exists()
Checks whether the file exists.long
getLength()
Returns the total length of the file, in bytesjava.lang.String
location()
The fully-qualified location of the input file as a String.SeekableInputStream
newStream()
Opens a newSeekableInputStream
for the underlying data file
-
-
-
Method Detail
-
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
java.lang.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
-
-