Add buffer to input/output stream