It is used to read data available in buffer.
Following is the declaration for std::basic_istream::readsome.
streamsize readsome (char_type* s, streamsize n);
n − Maximum number of characters to write to s (including the terminating null character).
s − Pointer to an array where the extracted characters are stored.
Returns the number of characters stored.
Basic guarantee − if an exception is thrown, the object is in a valid state.
Modifies the elements in the array pointed by s and the stream object.