public ResourceReader(Stream stream)
{
if (stream==null)
throw new ArgumentNullException("stream");
if (!stream.CanRead)
throw new ArgumentException(Environment.GetResourceString("Argument_StreamNotReadable"));
_resCache = new Dictionary<String, ResourceLocator>(FastResourceComparer.Default);
_store = new BinaryReader(stream, Encoding.UTF8);
// We have a faster code path for reading resource files from an assembly.
_ums = stream as UnmanagedMemoryStream;
BCLDebug.Log("RESMGRFILEFORMAT", "ResourceReader .ctor(Stream). UnmanagedMemoryStream: "+(_ums!=null));
ReadResources();
}