public function read($len = null)
    {
        $buffer = $this->in->read($len);

        if ($buffer === -1) {
            return -1;
        }

        // perform regex replace here ...
        foreach ($this->regexps as $exptype) {
            $regexp = $exptype->getRegexp($this->project);
            try {
                $buffer = $regexp->replace($buffer);
                $this->log(
                    "Performing regexp replace: /" . $regexp->getPattern() . "/" . $regexp->getReplace() . "/g" . $regexp->getModifiers(),
                    Project::MSG_VERBOSE
                );
            } catch (Exception $e) {
                // perhaps mismatch in params (e.g. no replace or pattern specified)
                $this->log("Error performing regexp replace: " . $e->getMessage(), Project::MSG_WARN);
            }
        }

        return $buffer;
    }