See the inline comments. Please run clang-format over this patch after addressing them (there are a few indentation issues).
"Set" -> "set", LLVM code style requires lower case first letters in function names (even though it's sadly may be inconsistent with other code that's still using the other style...)
LLVM convention is to call this takeX and not getX when it moves the member OutputStream to the caller. get usually doesn't reset the member variable.
Don't think we need that.