Package com.clickhouse.client.stream
Class Lz4InputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.clickhouse.client.ClickHouseInputStream
-
- com.clickhouse.client.stream.AbstractByteArrayInputStream
-
- com.clickhouse.client.stream.Lz4InputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class Lz4InputStream extends AbstractByteArrayInputStream
Reader from clickhouse in lz4.
-
-
Field Summary
-
Fields inherited from class com.clickhouse.client.stream.AbstractByteArrayInputStream
buffer, limit, position
-
Fields inherited from class com.clickhouse.client.ClickHouseInputStream
byteBuffer, closed, copyTo, EMPTY_BUFFER, EMPTY_BYTES, ERROR_INCOMPLETE_READ, ERROR_NULL_BYTES, ERROR_REUSE_BUFFER, ERROR_STREAM_CLOSED, file, postCloseAction
-
-
Constructor Summary
Constructors Constructor Description Lz4InputStream(ClickHouseFile file, InputStream stream, Runnable postCloseAction)Lz4InputStream(InputStream stream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected intupdateBuffer()Update inner byte array along withpositionandlimitas needed.-
Methods inherited from class com.clickhouse.client.stream.AbstractByteArrayInputStream
available, ensureOpen, peek, pipe, read, read, readBuffer, readByte, readBytes, readCustom, skip
-
Methods inherited from class com.clickhouse.client.ClickHouseInputStream
closeQuietly, empty, getUnderlyingFile, isClosed, of, of, of, of, of, of, of, of, of, of, of, of, of, of, of, of, pipe, pipe, readAsciiString, readAsciiString, readString, readString, readUnicodeString, readUnicodeString, readUnsignedByte, readVarInt, readVarLong, save, save, setCopyToTarget, wrap
-
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, transferTo
-
-
-
-
Constructor Detail
-
Lz4InputStream
public Lz4InputStream(InputStream stream)
-
Lz4InputStream
public Lz4InputStream(ClickHouseFile file, InputStream stream, Runnable postCloseAction)
-
-
Method Detail
-
updateBuffer
protected int updateBuffer() throws IOExceptionDescription copied from class:AbstractByteArrayInputStreamUpdate inner byte array along withpositionandlimitas needed.- Specified by:
updateBufferin classAbstractByteArrayInputStream- Returns:
- remaining bytes in buffer
- Throws:
IOException- when failed to read value
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classAbstractByteArrayInputStream- Throws:
IOException
-
-