public class AlluxioHdfsInputStream extends FileInStream
Constructor and Description |
---|
AlluxioHdfsInputStream(org.apache.hadoop.fs.FSDataInputStream input) |
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
long |
getPos() |
void |
mark(int limit) |
boolean |
markSupported() |
int |
positionedRead(long position,
byte[] buffer,
int offset,
int length)
Reads up to the specified number of bytes, from a given position within a file, and return the
number of bytes read.
|
int |
read() |
int |
read(byte[] bytes) |
int |
read(byte[] bytes,
int offset,
int length) |
long |
remaining() |
void |
reset() |
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 length) |
public AlluxioHdfsInputStream(org.apache.hadoop.fs.FSDataInputStream input)
input
- Hadoop FileSystem FSDataInputStreampublic int read(byte[] bytes) throws IOException
read
in class InputStream
IOException
public int read(byte[] bytes, int offset, int length) throws IOException
read
in class InputStream
IOException
public int read() throws IOException
read
in class InputStream
IOException
public long skip(long length) throws IOException
skip
in class InputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public void mark(int limit)
mark
in class InputStream
public void reset() throws IOException
reset
in class InputStream
IOException
public boolean markSupported()
markSupported
in class InputStream
public void seek(long position) throws IOException
Seekable
position
- the position to seek to, it must be between 0 and the end of the stream - 1IOException
public long getPos() throws IOException
IOException
public long remaining()
public int positionedRead(long position, byte[] buffer, int offset, int length) throws IOException
PositionedReadable
position
- position within filebuffer
- destination bufferoffset
- offset in the bufferlength
- number of bytes to readIOException
Copyright © 2023. All Rights Reserved.