private MemoryStream getMemoryStreamFromResponse(HttpWebResponse response) { StreamReader reader = new StreamReader(response.GetResponseStream()); byte[] buffer = reader.ReadAllBytes(); RequestThrottle.Instance.Complete(); return new MemoryStream(buffer); }
public void Set(string key, Stream data) { StreamReader reader = new StreamReader(data); File.WriteAllBytes(getFullPath(key), reader.ReadAllBytes()); }