Package org.apache.orc.impl
Class InStream.CompressedStream
java.lang.Object
java.io.InputStream
org.apache.orc.impl.InStream
org.apache.orc.impl.InStream.CompressedStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Enclosing class:
- InStream
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.orc.impl.InStream
InStream.CompressedStream, InStream.EncryptedStream, InStream.StreamOptions, InStream.UncompressedStream
-
Field Summary
Modifier and TypeFieldDescriptionprotected ByteBuffer
protected long
protected org.apache.hadoop.hive.common.io.DiskRangeList
-
Constructor Summary
ConstructorDescriptionCompressedStream
(Object name, long offset, long length, InStream.StreamOptions options) Create the stream without resetting the input stream.CompressedStream
(Object name, org.apache.hadoop.hive.common.io.DiskRangeList input, long offset, long length, InStream.StreamOptions options) Create the stream and initialize the input for the stream. -
Method Summary
Modifier and TypeMethodDescriptionint
void
void
close()
int
read()
int
read
(byte[] data, int offset, int length) void
seek
(PositionProvider index) protected void
setCurrent
(org.apache.hadoop.hive.common.io.DiskRangeList newRange, boolean isJump) Set the current rangetoString()
Methods inherited from class org.apache.orc.impl.InStream
create, create, createCodedInputStream, options, reset, reset
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
compressed
-
currentRange
protected org.apache.hadoop.hive.common.io.DiskRangeList currentRange -
currentCompressedStart
protected long currentCompressedStart
-
-
Constructor Details
-
CompressedStream
Create the stream without resetting the input stream. This is used in subclasses so they can finish initializing before reset is called.- Parameters:
name
- the name of the streamlength
- the total number of bytes in the streamoptions
- the options used to read the stream
-
CompressedStream
public CompressedStream(Object name, org.apache.hadoop.hive.common.io.DiskRangeList input, long offset, long length, InStream.StreamOptions options) Create the stream and initialize the input for the stream.- Parameters:
name
- the name of the streaminput
- the input datalength
- the total length of the streamoptions
- the options to read the data with
-
-
Method Details
-
setCurrent
protected void setCurrent(org.apache.hadoop.hive.common.io.DiskRangeList newRange, boolean isJump) Description copied from class:InStream
Set the current range- Specified by:
setCurrent
in classInStream
- Parameters:
newRange
- the block that is currentisJump
- if this was a seek instead of a natural read
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-
close
public void close() -
changeIv
-
seek
- Specified by:
seek
in classInStream
- Throws:
IOException
-
toString
-