ClickHouse/src/IO/ReadBufferFromIStream.h
Nikita Taranov 5485d2a2ec impl
2024-01-17 14:38:06 +01:00

26 lines
456 B
C++

#pragma once
#include <IO/ReadBuffer.h>
#include <IO/BufferWithOwnMemory.h>
#include <Poco/Net/HTTPBasicStreamBuf.h>
namespace DB
{
class ReadBufferFromIStream : public BufferWithOwnMemory<ReadBuffer>
{
private:
std::istream & istr;
Poco::Net::HTTPBasicStreamBuf & stream_buf;
bool eof = false;
bool nextImpl() override;
public:
explicit ReadBufferFromIStream(std::istream & istr_, size_t size = DBMS_DEFAULT_BUFFER_SIZE);
};
}