示例#1
0
 void flush() {
     if (!m_open) return;
     size_t n;
     if ((n = m_buf.size()) > 0) {
         m_file.write(m_buf.read(n), n);
         m_buf.crunch();
     }
 }
示例#2
0
 /// current number of bytes available to read.
 size_t size() const { return m_buf.size(); }