< prev index next >

src/hotspot/share/utilities/ostream.hpp

Print this page

        

*** 40,53 **** // we may use jio_printf: // jio_fprintf(defaultStream::output_stream(), "Message"); // This allows for redirection via -XX:+DisplayVMOutputToStdout and // -XX:+DisplayVMOutputToStderr class outputStream : public ResourceObj { - private: - outputStream(const outputStream&); - outputStream& operator=(const outputStream&); - protected: int _indentation; // current indentation int _width; // width of the page int _position; // position on the current line int _newlines; // number of '\n' output so far --- 40,49 ----
*** 188,216 **** ttyLocker::hold_tty(); } } }; ! // for writing to strings; buffer will expand automatically. ! // Buffer will always be zero-terminated. class stringStream : public outputStream { protected: char* buffer; size_t buffer_pos; size_t buffer_length; bool buffer_fixed; public: - // Create a stringStream using an internal buffer of initially initial_bufsize size; - // will be enlarged on demand. There is no maximum cap. stringStream(size_t initial_bufsize = 256); - // Creates a stringStream using a caller-provided buffer. Will truncate silently if - // it overflows. stringStream(char* fixed_buffer, size_t fixed_buffer_size); ~stringStream(); virtual void write(const char* c, size_t len); - // Return number of characters written into buffer, excluding terminating zero and - // subject to truncation in static buffer mode. size_t size() { return buffer_pos; } const char* base() { return buffer; } void reset() { buffer_pos = 0; _precount = 0; _position = 0; } char* as_string(); }; --- 184,206 ---- ttyLocker::hold_tty(); } } }; ! // for writing to strings; buffer will expand automatically class stringStream : public outputStream { protected: char* buffer; size_t buffer_pos; size_t buffer_length; bool buffer_fixed; + DEBUG_ONLY(ResourceMark* rm;) public: stringStream(size_t initial_bufsize = 256); stringStream(char* fixed_buffer, size_t fixed_buffer_size); ~stringStream(); virtual void write(const char* c, size_t len); size_t size() { return buffer_pos; } const char* base() { return buffer; } void reset() { buffer_pos = 0; _precount = 0; _position = 0; } char* as_string(); };
*** 276,286 **** const char* base() { return buffer; } void reset() { buffer_pos = 0; _precount = 0; _position = 0; } char* as_string(); }; ! #define O_BUFLEN 2000 // max size of output of individual print() methods #ifndef PRODUCT class networkStream : public bufferedStream { --- 266,276 ---- const char* base() { return buffer; } void reset() { buffer_pos = 0; _precount = 0; _position = 0; } char* as_string(); }; ! #define O_BUFLEN 20000 // max size of output of individual print() methods #ifndef PRODUCT class networkStream : public bufferedStream {
< prev index next >