Synopsis

template <class E, class T = char_traits<E> >
    class basic_streambuf {
public:
    typedef E char_type;
    typedef T traits_type;
    typedef typename traits_type::int_type int_type;
    typedef typename traits_type::pos_type pos_type;
    typedef typename traits_type::off_type off_type;
    virtual ~streambuf();
    locale pubimbue(const locale& loc);
    locale getloc() const;
    basic_streambuf *pubsetbuf(char_type *s,
        streamsize n);
    pos_type pubseekoff(off_type off,
        ios_base::seekdir way,
        ios_base::openmode which =
            ios_base::in | ios_base::out);
    pos_type pubseekpos(pos_type sp,
        ios_base::openmode which =
            ios_base::in | ios_base::out);
    int pubsync();
    streamsize in_avail();
    int_type snextc();
    int_type sbumpc();
    int_type sgetc();
    void stossc();  // OPTIONAL
    streamsize sgetn(char_type *s, streamsize n);
    int_type sputbackc(char_type c);
    int_type sungetc();
    int_type sputc(char_type c);
    streamsize sputn(const char_type *s, streamsize n);
protected:
    basic_streambuf();
    char_type *eback() const;
    char_type *gptr() const;
    char_type *egptr() const;
    void gbump(int n);
    void setg(char_type *gbeg,
        char_type *gnext, char_type *gend);
    char_type *pbase() const;
    char_type *pptr() const;
    char_type *epptr() const;
    void pbump(int n);
    void setp(char_type *pbeg, char_type *pend);
    virtual void imbue(const locale &loc);
    virtual basic_streambuf *setbuf(char_type *s,
        streamsize n);
    virtual pos_type seekoff(off_type off,
        ios_base::seekdir way,
        ios_base::openmode which =
            ios_base::in | ios_base::out);
    virtual pos_type seekpos(pos_type sp,
        ios_base::openmode which =
            ios_base::in | ios_base::out);
    virtual int sync();
    virtual streamsize showmanyc();
    virtual streamsize xsgetn(char_type *s,
        streamsize n);
    virtual int_type underflow();
    virtual int_type uflow();
    virtual int_type pbackfail(int_type c =
        traits_type::eof());
    virtual streamsize xsputn(const char_type *s,
        streamsize n);
    virtual int_type overflow(int_type c =
        traits_type::eof());
    };