Reads the contents of the archive file without the signature.

@param Reader $reader The archive file reader.

@return string The archive data.
332643
private function getData(Reader $reader)
    {
        $size = $this->getSize($reader);

        $reader->seek(0);

        return $reader->read($reader->getSize() - 12 - $size);
    }
397823
public function getReaderForFile($filename, $mode, $use_include_path, $context)
    {
        $readers = $this->readers;
        if (!isset($readers[$filename])) {
            $reader = new BufferedFileRead();
            $result = $reader->fopen($filename, $mode, $use_include_path, $context);

            return $this->readers[$filename] = $result ? $reader : null;
        }
        return $readers[$filename];
    }
364483
public function reader($key, $reader = null)
    {
        if ($reader === null) {
            return $this->getConfig('readers.' . $key);
        }

        return $this->setConfig('readers.' . $key, $reader);
    }
1043927
protected function extract(StreamReader $reader)
    {
        $cycles = -1;
        $bytesPerCycle = 100;

        $reader->reset(null, $bytesPerCycle);

        while (
            ($trailerPos = \strpos($reader->getBuffer(false), 'trailer', \max($bytesPerCycle * $cycles++, 0))) === false
        ) {
            if ($reader->increaseLength($bytesPerCycle) === false) {
                break;
            }
        }

        if ($trailerPos === false) {
            throw new CrossReferenceException(
                'Unexpected end of cross reference. "trailer"-keyword not found.',
                CrossReferenceException::NO_TRAILER_FOUND
            );
        }

        $xrefContent = \substr($reader->getBuffer(false), 0, $trailerPos);
        $reader->reset($reader->getPosition() + $trailerPos);

        return $xrefContent;
    }
15012
public function getReadHandler()
    {
        if (null === $this->stream) {
            $this->stream = fopen($this->uri, 'r');
        }
        return $this->stream;
    }
50985
public void readExternal(PofReader reader)
            throws IOException {
        name = reader.readString(0);
        last = reader.readLong(1);
    }
902348
public function read($read = false)
    {
        $this->read = true;

        if ($read === false) {
            $this->read = false;
        }

        return $this;
    }
64911
protected function _readFile($source)
    {
        $data = '';
        if (is_file($source) && is_readable($source)) {
            $data = @file_get_contents($source);
            if ($data === false) {
                throw new Mage_Exception("Can't get contents from: " . $source);
            }
        }
        return $data;
    }
306634
public static String readerToString(Reader reader) {
		try {
			StringBuilder sb = new StringBuilder();
			char[] buf = new char[1024];
			int numRead = 0;
			while ((numRead = reader.read(buf)) != -1) {
				sb.append(buf, 0, numRead);
			}
			return sb.toString();
		} catch (Exception e) {
			throw new RuntimeException(e);
		}

	}
90791
public static String getReaderContentAsString(Reader reader) throws IOException {

        int count;
        final char[] buffer = new char[2048];
        final StringBuilder out = new StringBuilder();
        while ((count = reader.read(buffer, 0, buffer.length)) >= 0) {
            out.append(buffer, 0, count);
        }

        return (out.toString());
    }
933225
protected function _initReader()
    {
        $this->_reader = new Mage_Archive_Helper_File($this->_getCurrentFile());
        $this->_reader->open('r');

        return $this;
    }
262105
protected function parseDimensionsElement(\XMLReader $reader)
    {
        $dimensions = [];
        $currentDimension = null;

        while ($reader->read()) {
            switch ($reader->nodeType) {
                case \XMLReader::ELEMENT:
                    $currentDimension = $reader->name;
                    break;
                case \XMLReader::END_ELEMENT:
                    if ($reader->name === 'dimensions') {
                        return $dimensions;
                    }
                    break;
                case \XMLReader::CDATA:
                case \XMLReader::TEXT:
                    $dimensions[$currentDimension][] = $reader->value;
                    break;
            }
        }

        return $dimensions;
    }
796000
public static function read(string $file = ''): string
    {
        $result = false;
        $file = static::normalizePath($file);

        if (static::exists($file)) {
            $result = @\file_get_contents($file);
        }

        return $result;
    }
288595
protected static String read(Reader file) throws IOException {
		final StringBuilder content = new StringBuilder();
		try (BufferedReader reader = new BufferedReader(file)) {
			String line = reader.readLine();
			boolean first = true;
			while (line != null) {
				if (first) {
					first = false;
				} else {
					content.append("\n"); //$NON-NLS-1$
				}
				content.append(line);
				line = reader.readLine();
			}
		}
		return content.toString();
	}
621594
protected function getReaderWrapper($content) {
		if (!$content) {
			$content = $this->source;
		}

		$reader = null;
		
		if (is_resource($content)) {
			$data = null;
			while (!feof($content)) {
				$data .= fread($content, 8192);
			}
			fclose($content);
			$reader = new RawContentReader($data);
		} else if ($content instanceof ContentReader) {
			$reader = $content;
		} else if (is_string($content)) {
			// assumed to be a file
			if (file_exists($content) && is_readable($content)) {
				// naughty, but it's the exception that proves the rule...
				$reader = new FileContentReader($content);
			} else {
				$reader = new RawContentReader($content);
			}
		}

		return $reader;
	}
487602
private function reader($path)
    {
        $reader = ReaderFactory::create($this->getType($path));
        $this->setOptions($reader);
        /* @var \Box\Spout\Reader\ReaderInterface $reader */
        $reader->open($path);

        return $reader;
    }
1299413
public function parseFiles(
        Finder $finder,
        Reader $reader,
        WorkerCollection $workerCollection
    )
    {

        /**
         * Every file found is parsed
         */
        foreach ($finder as $file) {

            /**
             * File is accepted to be parsed
             */
            $classNamespace = $this->getFileClassNamespace($file->getRealpath());
            $reflectionClass = new ReflectionClass($classNamespace);
            $classAnnotations = $reader->getClassAnnotations($reflectionClass);

            /**
             * Every annotation found is parsed
             */
            foreach ($classAnnotations as $annotation) {

                /**
                 * Annotation is only laoded if is typeof WorkAnnotation
                 */
                if ($annotation instanceof WorkAnnotation) {

                    /**
                     * Creates new Worker element with all its Job data
                     */
                    $worker = new Worker($annotation, $reflectionClass, $reader, $this->servers, $this->defaultSettings);
                    $workerCollection->add($worker);
                }
            }
        }

        return $this;
    }