lib/classes/Swift/CharacterStream/ArrayCharacterStream.php
public function importByteStream(Swift_OutputByteStream $os)
    {
        if (!isset($this->charReader)) {
            $this->charReader = $this->charReaderFactory
                ->getReaderFor($this->charset);
        }

        $startLength = $this->charReader->getInitialByteSize();
        while (false !== $bytes = $os->read($startLength)) {
            $c = [];
            for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) {
                $c[] = self::$byteMap[$bytes[$i]];
            }
            $size = count($c);
            $need = $this->charReader
                ->validateByteSequence($c, $size);
            if ($need > 0 &&
                false !== $bytes = $os->read($need)) {
                for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) {
                    $c[] = self::$byteMap[$bytes[$i]];
                }
            }
            $this->array[] = $c;
            ++$this->array_size;
        }
    }
public function importByteStream(Swift_OutputByteStream $os)
    {
        if (!isset($this->charReader)) {
            $this->charReader = $this->charReaderFactory
                ->getReaderFor($this->charset);
        }

        $startLength = $this->charReader->getInitialByteSize();
        while (false !== $bytes = $os->read($startLength)) {
            $c = [];
            for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) {
                $c[] = self::$byteMap[$bytes[$i]];
            }
            $size = count($c);
            $need = $this->charReader
                ->validateByteSequence($c, $size);
            if ($need > 0 &&
                false !== $bytes = $os->read($need)) {
                for ($i = 0, $len = strlen($bytes); $i < $len; ++$i) {
                    $c[] = self::$byteMap[$bytes[$i]];
                }
            }
            $this->array[] = $c;
            ++$this->array_size;
        }
    }
public function importByteStream ( Swift_OutputByteStream $ os ) { if ( ! isset ( $ this -> charReader ) ) { $ this -> charReader = $ this -> charReaderFactory -> getReaderFor ( $ this -> charset ) ; } $ startLength = $ this -> charReader -> getInitialByteSize ( ) ; while ( false !== $ bytes = $ os -> read ( $ startLength ) ) { $ c = [ ] ; for ( $ i = 0 , $ len = strlen ( $ bytes ) ; $ i < $ len ; ++ $ i ) { $ c [ ] = self :: $ byteMap [ $ bytes [ $ i ] ] ; } $ size = count ( $ c ) ; $ need = $ this -> charReader -> validateByteSequence ( $ c , $ size ) ; if ( $ need > 0 && false !== $ bytes = $ os -> read ( $ need ) ) { for ( $ i = 0 , $ len = strlen ( $ bytes ) ; $ i < $ len ; ++ $ i ) { $ c [ ] = self :: $ byteMap [ $ bytes [ $ i ] ] ; } } $ this -> array [ ] = $ c ; ++ $ this -> array_size ; } }
Overwrite this character stream using the byte sequence in the byte stream.

@param Swift_OutputByteStream $os output stream to read from
Overwrite this character stream using the byte sequence in the byte stream .