public class HdfsPositionedUnderFileInputStream extends SeekableUnderFileInputStream implements PositionReader
FSDataInputStream
API.
This stream can be cached for reuse.in
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close()
Closes the positon reader and do cleanup job if any.
|
long |
getPos() |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] buffer,
int offset,
int length)
If there has been a number of sequential reads in a row,
we move to regular buffered reads.
|
int |
readInternal(long position,
ReadTargetBuffer buffer,
int length) |
void |
seek(long position)
Moves the starting read position of the stream to the specified position which is relative to
the start of the stream.
|
long |
skip(long n) |
mark, reset
public int available() throws IOException
available
in class FilterInputStream
IOException
public long getPos()
getPos
in interface Positioned
public int read()
read
in class FilterInputStream
public int read(byte[] b)
read
in class FilterInputStream
public int read(byte[] buffer, int offset, int length)
read
in class FilterInputStream
public void seek(long position)
Seekable
public long skip(long n)
skip
in class FilterInputStream
public boolean markSupported()
markSupported
in class FilterInputStream
public int readInternal(long position, ReadTargetBuffer buffer, int length) throws IOException
readInternal
in interface PositionReader
position
- position of the file to start reading databuffer
- target byte bufferlength
- bytes to readIOException
public void close() throws IOException
PositionReader
close
in interface PositionReader
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterInputStream
IOException
Copyright © 2023. All Rights Reserved.