Exemple #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void read(String fileName) throws java.io.IOException
        public virtual void read(string fileName)
        {
            System.IO.FileStream fileInputStream     = new System.IO.FileStream(fileName, System.IO.FileMode.Open, System.IO.FileAccess.Read);
            GZIPInputStream      gzipInputStream     = new GZIPInputStream(fileInputStream);
            BufferedInputStream  bufferedInputStream = new BufferedInputStream(gzipInputStream);
            StateInputStream     stream = new StateInputStream(bufferedInputStream);

            if (log.InfoEnabled)
            {
                Console.WriteLine(string.Format("Reading state from file '{0}'", fileName));
            }

            try
            {
                read(stream);
                if (stream.read() >= 0)
                {
                    Console.WriteLine(string.Format("State file '{0}' containing too much data", fileName));
                }
            }
            finally
            {
                stream.close();
            }

            //if (log.DebugEnabled)
            {
                Console.WriteLine(string.Format("Done reading state from file '{0}'", fileName));
            }
        }
Exemple #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override public void read(StateInputStream stream) throws java.io.IOException
        public virtual void read(StateInputStream stream)
        {
            stream.readVersion(STATE_VERSION);
            Emulator.Clock.read(stream);
            Emulator.Processor.read(stream);
            Emulator.Memory.read(stream);
            HLEModuleManager.Instance.read(stream);
            if (RuntimeContextLLE.LLEActive)
            {
                RuntimeContextLLE.read(stream);
                RuntimeContextLLE.createMMIO();
                RuntimeContextLLE.MMIO.read(stream);
                RuntimeContextLLE.MediaEngineProcessor.read(stream);
                RuntimeContextLLE.MediaEngineProcessor.MEMemory.read(stream);
            }
        }