public abstract class InStream extends InputStream
Modifier and Type | Class and Description |
---|---|
static class |
InStream.UncompressedStream |
Modifier and Type | Field and Description |
---|---|
protected long |
length |
protected String |
name |
static int |
PROTOBUF_MESSAGE_MAX_LIMIT |
Modifier and Type | Method and Description |
---|---|
abstract void |
close() |
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.
|
static com.google.protobuf.CodedInputStream |
createCodedInputStream(String name,
List<DiskRange> input,
long length,
CompressionCodec codec,
int bufferSize)
Creates coded input stream (used for protobuf message parsing) with higher message size limit.
|
long |
getStreamLength() |
String |
getStreamName() |
abstract void |
seek(PositionProvider index) |
available, mark, markSupported, read, read, read, reset, skip
public static final int PROTOBUF_MESSAGE_MAX_LIMIT
protected final String name
protected long length
public InStream(String name, long length)
public String getStreamName()
public long getStreamLength()
public abstract void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
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
public static com.google.protobuf.CodedInputStream createCodedInputStream(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 © 2016 The Apache Software Foundation. All rights reserved.