public class DirectBufInputStream extends FilterInputStream
| Modifier and Type | Field and Description |
|---|---|
protected BufferAllocator |
allocator |
protected boolean |
enableHints |
protected boolean |
enforceTotalByteSize |
protected long |
startOffset
The offset in the underlying stream to start reading from
|
protected String |
streamId |
protected long |
totalByteSize
The length of the data we expect to read.
|
in| Constructor and Description |
|---|
DirectBufInputStream(InputStream in,
BufferAllocator allocator,
String id,
long startOffset,
long totalByteSize,
boolean enforceTotalByteSize,
boolean enableHints) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkInputStreamState() |
protected void |
checkStreamSupportsByteBuffer() |
void |
close() |
protected static void |
fadviseIfAvailable(org.apache.hadoop.fs.FSDataInputStream inputStream,
long off,
long n) |
protected org.apache.hadoop.fs.FSDataInputStream |
getInputStream() |
DrillBuf |
getNext(int bytes) |
long |
getPos() |
boolean |
hasRemainder() |
void |
init() |
int |
read() |
int |
read(DrillBuf buf,
int off,
int len) |
available, mark, markSupported, read, read, reset, skipprotected boolean enableHints
protected String streamId
protected BufferAllocator allocator
protected final long totalByteSize
protected final boolean enforceTotalByteSize
protected final long startOffset
public DirectBufInputStream(InputStream in, BufferAllocator allocator, String id, long startOffset, long totalByteSize, boolean enforceTotalByteSize, boolean enableHints)
public void init()
throws IOException,
UnsupportedOperationException
public int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(DrillBuf buf, int off, int len) throws IOException
IOExceptionpublic DrillBuf getNext(int bytes) throws IOException
IOExceptionpublic long getPos()
throws IOException
IOExceptionpublic boolean hasRemainder()
throws IOException
IOExceptionprotected org.apache.hadoop.fs.FSDataInputStream getInputStream()
throws IOException
IOExceptionprotected void checkInputStreamState()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOExceptionprotected void checkStreamSupportsByteBuffer()
throws UnsupportedOperationException
UnsupportedOperationExceptionprotected static void fadviseIfAvailable(org.apache.hadoop.fs.FSDataInputStream inputStream,
long off,
long n)
Copyright © 2022 The Apache Software Foundation. All rights reserved.