Use memory stream.