BoundedStringWriter that keeps a limited amount (maxLength) of chars into
a sliding (elements are added and removed from the head) buffer and always prints them to an output sink.
It ensures the size is never greater than the maximum size given in the constructor.
Closing a BoundedStringWriter has no effect. The methods in this class
can be called after the stream has been closed without generating an