method

read

read(size=nil, buf=nil)
public

Reads size bytes from the stream. If buf is provided it must reference a string which will receive the data.

See IO#read for full details.