class Protocol::HTTP::Body::Readable
end
def close(error = nil) -> close the stream immediately.
def finish -> buffer the stream and close it.
def call(stream)
def call(stream) # Flushing after every chunk is inefficient, but it's also a safe default. self.each do |chunk| stream.write(chunk) stream.flush end end
def close(error = nil)
def close(error = nil) end
def each
def each while chunk = self.read yield chunk # chunk.clear end ensure self.close($!) end
def empty?
def empty? false end
def finish
def finish # Internally, this invokes `self.each` which then invokes `self.close`. Buffered.for(self) end
def join
def join buffer = String.new.force_encoding(Encoding::BINARY) self.each do |chunk| buffer << chunk chunk.clear end return buffer end
def length
def length nil end
def read
def read nil end