internal static void WriteInt32(Stream s, int i) { s.WriteByte((byte) (i & 0xFF)); s.WriteByte((byte) ((i >> 8) & 0xFF)); s.WriteByte((byte) ((i >> 16) & 0xFF)); s.WriteByte((byte) ((i >> 24) & 0xFF)); }
private void Store(Stream s, Hashtable table) { Utils.WriteInt32(s, table.Count); foreach (DictionaryEntry entry in table) { Utils.WriteString(s, (string)entry.Key); persister.Write(s, (ICacheItem)entry.Value); } }