Read the cross-reference table at a given offset.

Internally the method will try to evaluate the best reader for this cross-reference.

@param int $offset
@return ReaderInterface
@throws CrossReferenceException
@throws PdfTypeException
776795
protected function readXref($offset)
    {
        $this->parser->getStreamReader()->reset($offset);
        $this->parser->getTokenizer()->clearStack();
        $initValue = $this->parser->readValue();
        
        return $this->initReaderInstance($initValue);
    }
805808
public function offsetGet($offset)
    {
        $args = [$offset];
        $methodName = __FUNCTION__;

        return $this->findAndCall($methodName, $args);
    }
697085
public function getData($offset)
    {
        $this->parserPosition = null;
        $this->parserLevel    = 0;
        $data        = "";
        $parser      = @\xml_parser_create();
        $filePointer = $this->getIndex()->getFile()->getFilePointer();

        if (! \is_resource($parser)) {
            $error = \error_get_last();
            throw new ReadDataIndexException(
                "Could not create a xml parser: $error[message]"
            );

        }

        \xml_set_element_handler(
            $parser,
            array($this, "onStartElement"),
            array($this, "onEndElement")
        );

        \fseek($filePointer, $offset);
        while (\is_null($this->parserPosition)
                    && $chunk = \fread($filePointer, $this->getIndex()->getFile()->getBlockSize())
        ) {
            $data .= $chunk;
            \xml_parse($parser, $chunk);

        }

        \xml_parser_free($parser);

        if (\is_null($this->parserPosition)) {
            throw new ReadDataIndexException("Did not read any data");

        }
        return \substr($data, 0, $this->parserPosition);
    }
303417
public function offsetGet($offset)
    {
        $method = 'get'.static::formatOffset($offset);

        return $this->offsetExists($offset) ? $this->{$method}() : null;
    }
1017565
public function setOffset($offset)
    {
        if (!isset($this->_persistence) || !($this->_persistence instanceof IPersistance)) {
            throw new Exception("Repository Exception : No existe la interfaz de la persistencia o no implementa la interfaz IPersistance.");
        }

        $this->_persistence->setOffset($offset);

        return $this;
    }
1167242
public function offsetGet($offset)
    {
        return isset($this->collection[$offset]) ? $this->collection[$offset] : null;
    }
247666
public function offsetGet($offset)
    {
        if (in_array($offset, $this->filteredIndexes)){
            return $this->offsetGet($offset+1);
        }

        $object = $this->models[$offset];
        $id = $object->UniqueIdentifier;

        if (isset($this->augmentationData[$id])){
            $object->mergeRawData($this->augmentationData[$id]);
        }

        return $object;
    }
52777
public function offsetGet($offset)
    {
        // if the binding does not exist then throw exception.
        if (! $this->has($offset)) {
            throw new NotFoundException('Binding '.$offset.' not found.');
        }

        return $this->resolve($offset);
    }
501055
public function offsetGet($offset)
    {
        if (isset($this->rows[ $offset ])) {
            return $this->rows[ $offset ];
        }

        return false;
    }
898276
public function offsetGet($offset)
    {
        $canonical = $this->canonical($offset);
        if (isset($this->headers[$canonical])) {
            return $this->headers[$canonical];
        } else {
            return null;
        }
    }
159026
public function offsetGet($offset)
    {
        if (!parent::offsetExists($offset)) {
            if ($this->_cache) {
                $result = unserialize(apc_fetch($this->_cache_prefix.'-'.$offset));
            } else {
                $result = false;
            }
        } else {
            $result = parent::offsetGet($offset);
        }

        return $result;
    }
157515
public function offsetGet($offset)
    {
        $offset = (int) $offset;
        if ($offset < 0 || $offset >= $this->_count) {
            throw new Kwf_Exception("Illegal index $offset");
        }
        $this->_pointer = $offset;

        return $this->current();
    }
272495
public function offset(int $offset) : QueryBuilder
    {
        $this->_query[] = "OFFSET";
        $this->_query[] = $offset;

        return $this;
    }
699139
public function offset( $offset )
    {
        $offset = (int)$offset;
        if( $offset >= 0 )
            $this->offset = $offset;

        return $this;
    }
1114305
public function offsetGet($offset)
	{
		list($index_name, $key) = $this->normalizeAccessKey($offset);

		return $this->get($key, null, $index_name);
	}
1365197
public function offsetGet($offset)
    {
        if (!isset($this->partialFusionTree[$offset])) {
            return null;
        }
        if (!is_array($this->partialFusionTree[$offset])) {
            // Simple type; we call "evaluate" nevertheless to make sure processors are applied.
            return $this->fusionRuntime->evaluate($this->path . '/' . $offset);
        } else {
            // arbitrary array (could be Eel expression, Fusion object, nested sub-array) again, so we wrap it with ourselves.
            return new FusionPathProxy($this->templateImplementation, $this->path . '/' . $offset, $this->partialFusionTree[$offset]);
        }
    }
276165
public function getCrossReference()
    {
        if ($this->xref === null) {
            $this->xref = new CrossReference($this, $this->resolveFileHeader());
        }

        return $this->xref;
    }