Support buffer for input as stdin