Lines Matching refs:offset
17 private $offset; variable in GuzzleHttp\\Psr7\\LimitStream
26 * @param int $offset Position to seek to before reading (only
32 $offset = 0 argument
36 $this->setOffset($offset);
51 return $this->stream->tell() >= $this->offset + $this->limit;
63 return $length - $this->offset;
65 return min($this->limit, $length - $this->offset);
73 public function seek($offset, $whence = SEEK_SET) argument
75 if ($whence !== SEEK_SET || $offset < 0) {
78 $offset,
83 $offset += $this->offset;
86 if ($offset > $this->offset + $this->limit) {
87 $offset = $this->offset + $this->limit;
91 $this->stream->seek($offset);
100 return $this->stream->tell() - $this->offset;
106 * @param int $offset Offset to seek to and begin byte limiting from
110 public function setOffset($offset) argument
114 if ($current !== $offset) {
117 $this->stream->seek($offset);
118 } elseif ($current > $offset) {
119 throw new \RuntimeException("Could not seek to stream offset $offset");
121 $this->stream->read($offset - $current);
125 $this->offset = $offset;
148 $remaining = ($this->offset + $this->limit) - $this->stream->tell();