Package com.clickhouse.client.stream
Class IterableByteBufferInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.clickhouse.client.ClickHouseInputStream
-
- com.clickhouse.client.stream.AbstractByteBufferInputStream
-
- com.clickhouse.client.stream.IterableByteBufferInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class IterableByteBufferInputStream extends AbstractByteBufferInputStream
-
-
Field Summary
-
Fields inherited from class com.clickhouse.client.stream.AbstractByteBufferInputStream
buffer
-
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 IterableByteBufferInputStream(Iterable<ByteBuffer> source, Runnable postCloseAction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intupdateBuffer()Update inner buffer as needed.-
Methods inherited from class com.clickhouse.client.stream.AbstractByteBufferInputStream
available, close, 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
-
IterableByteBufferInputStream
public IterableByteBufferInputStream(Iterable<ByteBuffer> source, Runnable postCloseAction)
-
-
Method Detail
-
updateBuffer
protected int updateBuffer() throws IOExceptionDescription copied from class:AbstractByteBufferInputStreamUpdate inner buffer as needed.- Specified by:
updateBufferin classAbstractByteBufferInputStream- Returns:
- remaining bytes in buffer
- Throws:
IOException- when failed to update buffer
-
-