Class FSDataInputStreamWrapper
- java.lang.Object
-
- org.apache.flink.formats.avro.utils.FSDataInputStreamWrapper
-
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.avro.file.SeekableInput
public class FSDataInputStreamWrapper extends Object implements Closeable, org.apache.avro.file.SeekableInput
Code copy pasted from org.apache.avro.mapred.FSInput (which is Apache licensed as well).The wrapper keeps track of the position in the data stream.
-
-
Constructor Summary
Constructors Constructor Description FSDataInputStreamWrapper(org.apache.flink.core.fs.FSDataInputStream stream, long len)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()longlength()intread(byte[] b, int off, int len)voidseek(long p)longtell()
-
-
-
Method Detail
-
length
public long length() throws IOException- Specified by:
lengthin interfaceorg.apache.avro.file.SeekableInput- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException- Specified by:
readin interfaceorg.apache.avro.file.SeekableInput- Throws:
IOException
-
seek
public void seek(long p) throws IOException- Specified by:
seekin interfaceorg.apache.avro.file.SeekableInput- Throws:
IOException
-
tell
public long tell() throws IOException- Specified by:
tellin interfaceorg.apache.avro.file.SeekableInput- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-