示例#1
0
        private MemoryStream getMemoryStreamFromResponse(HttpWebResponse response)
        {
            StreamReader reader = new StreamReader(response.GetResponseStream());
            byte[] buffer = reader.ReadAllBytes();
            RequestThrottle.Instance.Complete();

            return new MemoryStream(buffer);
        }
示例#2
0
 public void Set(string key, Stream data)
 {
     StreamReader reader = new StreamReader(data);
     File.WriteAllBytes(getFullPath(key), reader.ReadAllBytes());
 }