hotspot/src/share/vm/utilities/ostream.hpp
changeset 1383 3a216aa862b7
parent 1374 4c24294029a9
parent 768 d0bebc7eefc2
child 1388 3677f5f3d66b
equal deleted inserted replaced
1382:fa3de4068282 1383:3a216aa862b7
   208 // managed in C heap. Not MT-safe.
   208 // managed in C heap. Not MT-safe.
   209 class bufferedStream : public outputStream {
   209 class bufferedStream : public outputStream {
   210  protected:
   210  protected:
   211   char*  buffer;
   211   char*  buffer;
   212   size_t buffer_pos;
   212   size_t buffer_pos;
       
   213   size_t buffer_max;
   213   size_t buffer_length;
   214   size_t buffer_length;
   214   bool   buffer_fixed;
   215   bool   buffer_fixed;
   215  public:
   216  public:
   216   bufferedStream(size_t initial_bufsize = 256);
   217   bufferedStream(size_t initial_bufsize = 256, size_t bufmax = 1024*1024*10);
   217   bufferedStream(char* fixed_buffer, size_t fixed_buffer_size);
   218   bufferedStream(char* fixed_buffer, size_t fixed_buffer_size, size_t bufmax = 1024*1024*10);
   218   ~bufferedStream();
   219   ~bufferedStream();
   219   virtual void write(const char* c, size_t len);
   220   virtual void write(const char* c, size_t len);
   220   size_t      size() { return buffer_pos; }
   221   size_t      size() { return buffer_pos; }
   221   const char* base() { return buffer; }
   222   const char* base() { return buffer; }
   222   void  reset() { buffer_pos = 0; _precount = 0; _position = 0; }
   223   void  reset() { buffer_pos = 0; _precount = 0; _position = 0; }