readLong example


    public function readUTF() {
        $length = $this->readInt();
        return $this->read($length);
    }

    /** * @return string */
    public function readLongUTF() {
        $length = $this->readLong();
        return $this->read($length);
    }

    /** * @param int $length * * @return string */
    public function read($length) {
        $val = substr($this->bytes, $this->pos, $length);
        $this->pos += $length;
        
$magic = hexdec(substr(dechex(current($magic)), -8));

        if (self::MO_LITTLE_ENDIAN_MAGIC == $magic) {
            $isBigEndian = false;
        } elseif (self::MO_BIG_ENDIAN_MAGIC == $magic) {
            $isBigEndian = true;
        } else {
            throw new InvalidResourceException('MO stream content has an invalid format.');
        }

        // formatRevision         $this->readLong($stream$isBigEndian);
        $count = $this->readLong($stream$isBigEndian);
        $offsetId = $this->readLong($stream$isBigEndian);
        $offsetTranslated = $this->readLong($stream$isBigEndian);
        // sizeHashes         $this->readLong($stream$isBigEndian);
        // offsetHashes         $this->readLong($stream$isBigEndian);

        $messages = [];

        for ($i = 0; $i < $count; ++$i) {
            
Home | Imprint | This part of the site doesn't use cookies.