FlickrNet.PersistentCache.Load C# (CSharp) Method

Load() private method

private Load ( Stream s ) : Hashtable
s Stream
return System.Collections.Hashtable
        private Hashtable Load(Stream s)
        {
            Hashtable table = new Hashtable();
            int itemCount = Utils.ReadInt32(s);
            for (int i = 0; i < itemCount; i++)
            {
                try
                {
                    string key = Utils.ReadString(s);
                    ICacheItem val = persister.Read(s);
                    if( val == null ) // corrupt cache file
                        return table;

                    table[key] = val;
                }
                catch(IOException)
                {
                    return table;
                }
            }
            return table;
        }