public function getContents()
    {
        // If an offset is provided
        if ($this->offset !== -1) {
            // Seek to the offset
            $this->stream->seek($this->offset);
        }

        // If a max length is provided
        if ($this->maxLength !== -1) {
            // Read from the offset till the maxLength
            return $this->stream->read($this->maxLength);
        }

        return $this->stream->getContents();
    }