public function seek($offset, $whence = SEEK_SET)
    {
        if ($this->_filename === 'php://input' && $this->eof() && !$offset && $whence === SEEK_SET) {
            $this->close();
            $this->_resource = fopen($this->_filename, 'r');
        }
        $this->_ensureSeekable();
        fseek($this->_resource, $offset, $whence);
        return ftell($this->_resource);
    }