I need to receive the byte as a whole from server. The data will be very long as is a picture data in byte array. How to write the file in to a stream and how to read a file from a stream instead ? Example with code is very appreciated. thanks.