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, skippublic 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 Closeableclose in interface AutoCloseableclose in class InputStreampublic 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 sizeIOExceptionpublic 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 sizeIOExceptionpublic 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 sizeIOExceptionCopyright © 2013–2018 The Apache Software Foundation. All rights reserved.