标签:art tostring cat 程序 get ext size while start
public class CoreCtrl { public static void MainCtrl(object FileWebsite) { Thread t = new Thread(new ParameterizedThreadStart(Go)); t.Start(FileWebsite); } static void Go(object FileWebsite) { try { // HostName + FileName = "http://files.cnblogs.com/files/HostIP/*******.sh" HttpWebRequest request = (HttpWebRequest)WebRequest.Create(FileWebsite.ToString()); HttpWebResponse response = request.GetResponse() as HttpWebResponse; Stream responseStream = response.GetResponseStream(); Stream stream = new FileStream("D:\\*******.ini", FileMode.Create);//System.Environment.SpecialFolder.System + byte[] bArr = new byte[1024]; int size = responseStream.Read(bArr, 0, bArr.Length); while (size > 0) { stream.Write(bArr, 0, size); size = responseStream.Read(bArr, 0, bArr.Length); } stream.Close(); responseStream.Close(); } catch { } } }
标签:art tostring cat 程序 get ext size while start
原文地址:http://www.cnblogs.com/HostIP/p/6596028.html