When printing the error log in vmError.cpp, we want to use as little stack space as possible. outputStream class uses on-stack buffers to assemble snprintf functions. So, staticBufferStream was introduced as a child of outputStream which overwrites the print functions and makes them use a caller provided buffer. It then delegates the real writing to a connected stream object.
The problem with that approach is that this is not a good fit for a child class.Not all operations possible with outputStream are cleanly delegated to the connected stream class, so a staticBufferStream behaves sometimes differently from all other streams (see e.g.
Another problem is that this delegation model leads to some code duplication, because all print() methods of outputStream are practically duplicated in staticBufferStream.
Another cosmetic note is that all other child classes of outputStream (bufferedStream, stringStream, fileStream...) are specializations in term of log destination, not internal behaviour.
This could be implemented in a simpler way - and staticBufferStream could be removed - simply by giving the parent class itself the ability to use a caller provided buffer instead of always using on-stack buffers.