/**
* Close both the remote stream and buffer stream
*/
public function close(): void
{ $this->remoteStream->
close();
$this->stream->
close();
} private function cacheEntireStream(): int
{ $target =
new FnStream(['write' => 'strlen'
]);
Utils::
copyToStream($this,
$target);
return $this->
tell();
}}