public abstract class InStream extends InputStream
Modifier and Type | Field and Description |
---|---|
protected long |
length |
protected String |
name |
Modifier and Type | Method and Description |
---|---|
static InStream |
create(String streamName,
ByteBuffer[] buffers,
long[] offsets,
long length,
CompressionCodec codec,
int bufferSize)
Deprecated.
|
static InStream |
create(String name,
List<DiskRange> input,
long length,
CompressionCodec codec,
int bufferSize)
Create an input stream from a list of disk ranges with data.
|
long |
getStreamLength() |
String |
getStreamName() |
abstract void |
seek(PositionProvider index) |
available, close, mark, markSupported, read, read, read, reset, skip
protected final String name
protected final long length
public InStream(String name, long length)
public String getStreamName()
public long getStreamLength()
public abstract void seek(PositionProvider index) throws IOException
IOException
@Deprecated public static InStream create(String streamName, ByteBuffer[] buffers, long[] offsets, long length, CompressionCodec codec, int bufferSize) throws IOException
streamName
- the name of the streambuffers
- the list of ranges of bytes for the streamoffsets
- a list of offsets (the same length as input) that must
contain the first offset of the each set of bytes in inputlength
- the length in bytes of the streamcodec
- the compression codecbufferSize
- the compression buffer sizeIOException
public static InStream create(String name, List<DiskRange> input, long length, CompressionCodec codec, int bufferSize) throws IOException
name
- the name of the streaminput
- the list of ranges of bytes for the stream; from disk or cachelength
- the length in bytes of the streamcodec
- the compression codecbufferSize
- the compression buffer sizeIOException
Copyright © 2017 The Apache Software Foundation. All rights reserved.