Package org.apache.parquet.io
Class LocalInputFile
- java.lang.Object
-
- org.apache.parquet.io.LocalInputFile
-
- All Implemented Interfaces:
InputFile
public class LocalInputFile extends Object implements InputFile
LocalInputFileis an implementation needed by Parquet to read from local data files usingSeekableInputStreaminstances.
-
-
Constructor Summary
Constructors Constructor Description LocalInputFile(Path file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetLength()SeekableInputStreamnewStream()Open a newSeekableInputStreamfor the underlying data file.
-
-
-
Constructor Detail
-
LocalInputFile
public LocalInputFile(Path file)
-
-
Method Detail
-
getLength
public long getLength() throws IOException- Specified by:
getLengthin interfaceInputFile- Returns:
- the total length of the file, in bytes.
- Throws:
IOException- if the length cannot be determined
-
newStream
public SeekableInputStream newStream() throws IOException
Description copied from interface:InputFileOpen a newSeekableInputStreamfor the underlying data file.- Specified by:
newStreamin interfaceInputFile- Returns:
- a new
SeekableInputStreamto read the file - Throws:
IOException- if the stream cannot be opened
-
-