public class InLineFsDataInputStream
extends org.apache.hadoop.fs.FSDataInputStream
FSDataInputStream. A startOffset that is passed in is assumed to be the start of the InputStream.
All operations are handled having the startOffset as starting point.in| Constructor and Description |
|---|
InLineFsDataInputStream(long startOffset,
org.apache.hadoop.fs.FSDataInputStream outerStream,
long length) |
| Modifier and Type | Method and Description |
|---|---|
FileDescriptor |
getFileDescriptor() |
long |
getPos() |
int |
read(ByteBuffer buf) |
ByteBuffer |
read(org.apache.hadoop.io.ByteBufferPool bufferPool,
int maxLength,
EnumSet<org.apache.hadoop.fs.ReadOption> opts) |
int |
read(long position,
byte[] buffer,
int offset,
int length) |
void |
readFully(long position,
byte[] buffer) |
void |
readFully(long position,
byte[] buffer,
int offset,
int length) |
void |
releaseBuffer(ByteBuffer buffer) |
void |
seek(long desired) |
boolean |
seekToNewSource(long targetPos) |
void |
setDropBehind(Boolean dropBehind) |
void |
setReadahead(Long readahead) |
void |
unbuffer() |
getWrappedStream, hasCapability, read, read, toStringread, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytesavailable, close, mark, markSupported, read, reset, skippublic InLineFsDataInputStream(long startOffset,
org.apache.hadoop.fs.FSDataInputStream outerStream,
long length)
throws IOException
IOExceptionpublic void seek(long desired)
throws IOException
seek in interface org.apache.hadoop.fs.Seekableseek in class org.apache.hadoop.fs.FSDataInputStreamIOExceptionpublic long getPos()
throws IOException
getPos in interface org.apache.hadoop.fs.SeekablegetPos in class org.apache.hadoop.fs.FSDataInputStreamIOExceptionpublic int read(long position,
byte[] buffer,
int offset,
int length)
throws IOException
read in interface org.apache.hadoop.fs.PositionedReadableread in class org.apache.hadoop.fs.FSDataInputStreamIOExceptionpublic void readFully(long position,
byte[] buffer,
int offset,
int length)
throws IOException
readFully in interface org.apache.hadoop.fs.PositionedReadablereadFully in class org.apache.hadoop.fs.FSDataInputStreamIOExceptionpublic void readFully(long position,
byte[] buffer)
throws IOException
readFully in interface org.apache.hadoop.fs.PositionedReadablereadFully in class org.apache.hadoop.fs.FSDataInputStreamIOExceptionpublic boolean seekToNewSource(long targetPos)
throws IOException
seekToNewSource in interface org.apache.hadoop.fs.SeekableseekToNewSource in class org.apache.hadoop.fs.FSDataInputStreamIOExceptionpublic int read(ByteBuffer buf) throws IOException
read in interface org.apache.hadoop.fs.ByteBufferReadableread in class org.apache.hadoop.fs.FSDataInputStreamIOExceptionpublic FileDescriptor getFileDescriptor() throws IOException
getFileDescriptor in interface org.apache.hadoop.fs.HasFileDescriptorgetFileDescriptor in class org.apache.hadoop.fs.FSDataInputStreamIOExceptionpublic void setReadahead(Long readahead) throws IOException, UnsupportedOperationException
setReadahead in interface org.apache.hadoop.fs.CanSetReadaheadsetReadahead in class org.apache.hadoop.fs.FSDataInputStreamIOExceptionUnsupportedOperationExceptionpublic void setDropBehind(Boolean dropBehind) throws IOException, UnsupportedOperationException
setDropBehind in interface org.apache.hadoop.fs.CanSetDropBehindsetDropBehind in class org.apache.hadoop.fs.FSDataInputStreamIOExceptionUnsupportedOperationExceptionpublic ByteBuffer read(org.apache.hadoop.io.ByteBufferPool bufferPool, int maxLength, EnumSet<org.apache.hadoop.fs.ReadOption> opts) throws IOException, UnsupportedOperationException
read in interface org.apache.hadoop.fs.HasEnhancedByteBufferAccessread in class org.apache.hadoop.fs.FSDataInputStreamIOExceptionUnsupportedOperationExceptionpublic void releaseBuffer(ByteBuffer buffer)
releaseBuffer in interface org.apache.hadoop.fs.HasEnhancedByteBufferAccessreleaseBuffer in class org.apache.hadoop.fs.FSDataInputStreampublic void unbuffer()
unbuffer in interface org.apache.hadoop.fs.CanUnbufferunbuffer in class org.apache.hadoop.fs.FSDataInputStreamCopyright © 2024 The Apache Software Foundation. All rights reserved.