public function readInto(\blaze\lang\StringBuffer $buffer = null, $off = -1, $len = -1) { $result = $this->read($len); $read = strlen($result); if ($off < 0) { $buffer->append($result); } else { $buffer->insert($result, $off); } return $read; }
public function readInto(\blaze\lang\StringBuffer $buffer = null, $off = -1, $len = -1) { $result = unserialize($this->getNext()); $read = strlen($str); if ($len != -1 && $read != $len) { throw new \blaze\io\StreamCorruptedException('Tried to read ' . $len . ' chars for the next token but the token has ' . $read . ' characters.'); } if ($off < 0) { $buffer->append($result); } else { $buffer->insert($result, $off); } return $read; }