Standard C++ Library Reference ISO/IEC (VERSION3)

basic_istream::read
basic_istream& read(char_type *str, streamsize count);
The unformatted input function extracts up to count elements and stores them in the array
beginning at str. Extraction stops early on end-of-file, in which case the function calls
setstate(failbit). In any case, it returns *this.
basic_istream::readsome
streamsize readsome(char_type *str, streamsize count);
The unformatted input function extracts up to count elements and stores them in the array
beginning at str. If good() is false, the function calls setstate(failbit). Otherwise, it
assigns the value of rdbuf()->in_avail() to N. If N < 0, the function calls
setstate(eofbit). Otherwise, it replaces the value stored in N with the smaller of count
and N, then calls read(str, N). In any case, the function returns gcount().
basic_istream::seekg
basic_istream& seekg(pos_type pos);
basic_istream& seekg(off_type off,
ios_base::seek_dir way);
If fail() is false, the first member function calls newpos = rdbuf()->
pubseekpos(pos), for some pos_type temporary object newpos. If fail() is false, the
second function calls newpos = rdbuf()-> pubseekoff(off, way). In either case, if
(off_type)newpos == (off_type)(-1) (the positioning operation fails) the function
calls istr.setstate(failbit). Both functions return *this.
basic_istream::sentry
class sentry {
public:
explicit sentry(basic_istream& istr,
bool noskip = false);
operator bool() const;
};
The nested class describes an object whose declaration structures the formatted input functions
and the unformatted input functions. If istr.good() is true, the constructor:
calls istr.tie-> flush() if istr.tie() is not a null pointer
effectively calls ws(istr) if istr.flags() & skipws is nonzero
If, after any such preparation, istr.good() is false, the constructor calls