read(). * * @param int $length Length. * @return string */ public function readString($length); /** * Read a character. * It could be equivalent to $this->read(1). * * @return string */ public function readCharacter(); /** * Read a boolean. * * @return bool */ public function readBoolean(); /** * Read an integer. * * @param int $length Length. * @return int */ public function readInteger($length = 1); /** * Read a float. * * @param int $length Length. * @return float */ public function readFloat($length = 1); /** * Read an array. * In most cases, it could be an alias to the $this->scanf() method. * * @param mixed $argument Argument (because the behavior is very * different according to the implementation). * @return array */ public function readArray($argument = null); /** * Read a line. * * @return string */ public function readLine(); /** * Read all, i.e. read as much as possible. * * @param int $offset Offset. * @return string */ public function readAll($offset = 0); /** * Parse input from a stream according to a format. * * @param string $format Format (see printf's formats). * @return array */ public function scanf($format); }