stdout data buffer format to string