/** * Reads contents of a ressource into the buffer or if no buffer is given, * returns one char as int. * * @param blaze\lang\StringBuffer $buffer The buffer in which the chars shall be read into * @param int $off The startpoint of the buffer to start storing * @param int $len The maximum number of chars to be read * @return int If no buffer is given, it returns a char represented as int, or -1 if nothing could be read. * If a buffer is given, if returns the number of chars which were read into it, or -1 if nothing could be read. * @throws blaze\lang\IOException Is thrown when an IO error occurs or when the underlying ressource is already closed */ public function readInto(\blaze\lang\StringBuffer $buffer = null, $off = -1, $len = -1) { return $this->is->read($buffer, $off, $len); }
/** * Reads and returns data from the reader. * @param int $len Number of bytes to read, uses buffer size if not given. * @return string . */ public function read($len = -1) { return $this->in->read($len); }