Swift_ByteStream_ArrayByteStream::__construct PHP Method

__construct() public method

If $stack is given the stream will be populated with the bytes it contains.
public __construct ( mixed $stack = null )
$stack mixed of bytes in string or array form, optional
    public function __construct($stack = null)
    {
        if (is_array($stack)) {
            $this->_array = $stack;
            $this->_arraySize = count($stack);
        } elseif (is_string($stack)) {
            $this->write($stack);
        } else {
            $this->_array = array();
        }
    }