X
Xarky
Hi,
I am downloading data from the Internet using the following lines.
networkStream = tcpClient.GetStream(); // tcpClient specifies port +
ip
StreamReader streamReader = new StreamReader(networkStream);
response = streamReader.ReadLine();
After doing correct parsing of the downloaded code, I identify the
file extension such as txt, jpg, mp3, etc.
Now I would like to write the file locally, by creating the file and
storing the data retrieved. To write to the file I am using the
following.
StreamWriter streamWriter = new StreamWriter(path, false);
streamWriter.Writeline(data);
This technique has worked for text documents but is failing in other
files.
Can someone provide some help.
Thanks in Advance
I am downloading data from the Internet using the following lines.
networkStream = tcpClient.GetStream(); // tcpClient specifies port +
ip
StreamReader streamReader = new StreamReader(networkStream);
response = streamReader.ReadLine();
After doing correct parsing of the downloaded code, I identify the
file extension such as txt, jpg, mp3, etc.
Now I would like to write the file locally, by creating the file and
storing the data retrieved. To write to the file I am using the
following.
StreamWriter streamWriter = new StreamWriter(path, false);
streamWriter.Writeline(data);
This technique has worked for text documents but is failing in other
files.
Can someone provide some help.
Thanks in Advance