Lines Matching +full:s +full:- +full:tell
25 * from the stream. Pass -1 for no limit.
31 $limit = -1,
34 $this->stream = $stream;
35 $this->setLimit($limit);
36 $this->setOffset($offset);
42 if ($this->stream->eof()) {
47 if ($this->limit == -1) {
51 return $this->stream->tell() >= $this->offset + $this->limit;
60 if (null === ($length = $this->stream->getSize())) {
62 } elseif ($this->limit == -1) {
63 return $length - $this->offset;
65 return min($this->limit, $length - $this->offset);
77 'Cannot seek to offset %s with whence %s',
83 $offset += $this->offset;
85 if ($this->limit !== -1) {
86 if ($offset > $this->offset + $this->limit) {
87 $offset = $this->offset + $this->limit;
91 $this->stream->seek($offset);
95 * Give a relative tell()
98 public function tell() function in GuzzleHttp\\Psr7\\LimitStream
100 return $this->stream->tell() - $this->offset;
112 $current = $this->stream->tell();
116 if ($this->stream->isSeekable()) {
117 $this->stream->seek($offset);
121 $this->stream->read($offset - $current);
125 $this->offset = $offset;
133 * Use -1 for no limit.
137 $this->limit = $limit;
142 if ($this->limit == -1) {
143 return $this->stream->read($length);
148 $remaining = ($this->offset + $this->limit) - $this->stream->tell();
152 return $this->stream->read(min($remaining, $length));