31 Input/output library [input.output]

31.6 Stream buffers [stream.buffers]

31.6.3 Class template basic_streambuf [streambuf]

31.6.3.5 Virtual functions [streambuf.virtuals]

31.6.3.5.2 Buffer management and positioning [streambuf.virt.buffer]

basic_streambuf* setbuf(char_type* s, streamsize n);
Effects: Influences stream buffering in a way that is defined separately for each class derived from basic_streambuf in this Clause ([stringbuf.virtuals], [filebuf.virtuals]).
Default behavior: Does nothing.
Returns this.
pos_type seekoff(off_type off, ios_base::seekdir way, ios_base::openmode which = ios_base::in | ios_base::out);
Effects: Alters the stream positions within one or more of the controlled sequences in a way that is defined separately for each class derived from basic_streambuf in this Clause ([stringbuf.virtuals], [filebuf.virtuals]).
Default behavior: Returns pos_type(off_type(-1)).
pos_type seekpos(pos_type sp, ios_base::openmode which = ios_base::in | ios_base::out);
Effects: Alters the stream positions within one or more of the controlled sequences in a way that is defined separately for each class derived from basic_streambuf in this Clause ([stringbuf], [filebuf]).
Default behavior: Returns pos_type(off_type(-1)).
int sync();
Effects: Synchronizes the controlled sequences with the arrays.
That is, if pbase() is non-null the characters between pbase() and pptr() are written to the controlled sequence.
The pointers may then be reset as appropriate.
Returns: -1 on failure.
What constitutes failure is determined by each derived class ([filebuf.virtuals]).
Default behavior: Returns zero.