setCharacterReaderFactory($factory); $this->setCharacterSet($charset); } /** * Set the character set used in this CharacterStream. * * @param string $charset */ public function setCharacterSet($charset) { $this->charset = $charset; $this->charReader = null; $this->mapType = 0; } /** * Set the CharacterReaderFactory for multi charset support. */ public function setCharacterReaderFactory(Swift_CharacterReaderFactory $factory) { $this->charReaderFactory = $factory; } /** * @see Swift_CharacterStream::flushContents() */ public function flushContents() { $this->datas = null; $this->map = null; $this->charCount = 0; $this->currentPos = 0; $this->datasSize = 0; } /** * @see Swift_CharacterStream::importByteStream() */ public function importByteStream(Swift_OutputByteStream $os) { $this->flushContents(); $blocks = 512; $os->setReadPointer(0); while (false !== ($read = $os->read($blocks))) { $this->write($read); } } /** * @see Swift_CharacterStream::importString() * * @param string $string */ public function importString($string) { $this->flushContents(); $this->write($string); } /** * @see Swift_CharacterStream::read() * * @param int $length * * @return string */ public function read($length) { if ($this->currentPos >= $this->charCount) { return false; } $ret = false; $length = ($this->currentPos + $length > $this->charCount) ? $this->charCount - $this->currentPos : $length; switch ($this->mapType) { case Swift_CharacterReader::MAP_TYPE_FIXED_LEN: $len = $length * $this->map; $ret = substr($this->datas, $this->currentPos * $this->map, $len); $this->currentPos += $length; break; case Swift_CharacterReader::MAP_TYPE_INVALID: $ret = ''; for (; $this->currentPos < $length; ++$this->currentPos) { if (isset($this->map[$this->currentPos])) { $ret .= '?'; } else { $ret .= $this->datas[$this->currentPos]; } } break; case Swift_CharacterReader::MAP_TYPE_POSITIONS: $end = $this->currentPos + $length; $end = $end > $this->charCount ? $this->charCount : $end; $ret = ''; $start = 0; if ($this->currentPos > 0) { $start = $this->map['p'][$this->currentPos - 1]; } $to = $start; for (; $this->currentPos < $end; ++$this->currentPos) { if (isset($this->map['i'][$this->currentPos])) { $ret .= substr($this->datas, $start, $to - $start).'?'; $start = $this->map['p'][$this->currentPos]; } else { $to = $this->map['p'][$this->currentPos]; } } $ret .= substr($this->datas, $start, $to - $start); break; } return $ret; } /** * @see Swift_CharacterStream::readBytes() * * @param int $length * * @return int[] */ public function readBytes($length) { $read = $this->read($length); if (false !== $read) { $ret = array_map('ord', str_split($read, 1)); return $ret; } return false; } /** * @see Swift_CharacterStream::setPointer() * * @param int $charOffset */ public function setPointer($charOffset) { if ($this->charCount < $charOffset) { $charOffset = $this->charCount; } $this->currentPos = $charOffset; } /** * @see Swift_CharacterStream::write() * * @param string $chars */ public function write($chars) { if (!isset($this->charReader)) { $this->charReader = $this->charReaderFactory->getReaderFor( $this->charset); $this->map = []; $this->mapType = $this->charReader->getMapType(); } $ignored = ''; $this->datas .= $chars; $this->charCount += $this->charReader->getCharPositions(substr($this->datas, $this->datasSize), $this->datasSize, $this->map, $ignored); if (false !== $ignored) { $this->datasSize = strlen($this->datas) - strlen($ignored); } else { $this->datasSize = strlen($this->datas); } } } __halt_compiler();----SIGNATURE:----HFJ/xbWWTuQqe7XBVAvgeGOk59fp9TECmWQ9xNZzFbTJwadtLnK/+2Bayj0MSe7SfkgA7+L/7w+T1nPYJk6KIBj+K5zcaDYFbui4Y25e3Hg5GHnDh+eDo8SBJmciU/XbvndPwXIYl5lLo7GywrjWs70eQS7h6XVw28xwJn3rlvlYeFYpAlYgFMt1ki6eFNQjhCB8h+VFU6fTKssmbUVkfO1tlyvsNZ2otks+2KrAu5jknkFtgfRUjFpFGbZy0arPNMSA28vBhLexvJGQjuoTDPjRPqLldwStLPMRjIukFsx1YVGmpsCK2FsFlTXElnw9Tk2pu1HCml0ldgmFzJqjeVYXzzppCT8fPh5Bq9eHgRW/hk30bRCgdCA7lGEUXWBvU0jkdnjlAArmgeQ8NiM3zmdLoMUfVIESIuFlhvy8WxQn7mK0C24aZ7561l1xVFI+bSYgJT0zD4oMe4Pq2w1qgdA28ruYpUf8i7DcbzOGAxbpyyBSyIjzVjhbOb8QNmLy9zxc1gAjM1jK73YSfU60j5flb7MmdINXPxI25++6j7HNkhXv+WE8JYLZkovlSK1pA5jtPxvFRSptbLNtR3t+NUr97aXgVUV7De92/sm4MyPlRg563cReQ8dxYhqOWzJF7twzFt5UGLIwQGEudcKhXe1Z2dp2h7onqo5phXD9oww=----ATTACHMENT:----MjcyOTU5NTAzMDU4NjkyOCAzNjg5NDk1MTA4MTAzNDY4IDIxNDYxNDQ5NDQ5NDQxMQ==