58 $data = substr($this->_str, $this->_pos, $bytes);
59 $this->_pos += $bytes;
60 if (strlen($this->_str)<$this->_pos)
61 $this->_pos = strlen($this->_str);
68 if (strlen($this->_str)<$this->_pos)
69 $this->_pos = strlen($this->_str);
78 return strlen($this->_str);
90 if (file_exists($filename)) {
92 $this->_length=filesize($filename);
94 $this->_fd = fopen($filename,
'rb');
107 fseek($this->_fd, $this->_pos);
113 $chunk = fread($this->_fd, $bytes);
115 $bytes -= strlen($chunk);
117 $this->_pos = ftell($this->_fd);
124 fseek($this->_fd, $pos);
125 $this->_pos = ftell($this->_fd);
147 if (file_exists($filename)) {
149 $length=filesize($filename);
150 $fd = fopen($filename,
'rb');
156 $this->_str = fread($fd, $length);