Writes the data to the specified stream, returing #t if data is written successfully or #f otherwise.