CSPspEmu.Hle.Formats.Cso.SetStream C# (CSharp) Method

SetStream() public method

public SetStream ( Stream Stream ) : void
Stream Stream
return void
        public void SetStream(Stream Stream)
        {
            //this.Stream = new BufferedStream(Stream, 0x20000);
            this.Stream = Stream;

            // Read the header.
            this.Header = this.Stream.ReadStruct<HeaderStruct>();
            if (this.Header.Magic != 0x4F534943)
            {
                throw (new InvalidDataException("Not a CISO File"));
            }

            // Read the block list
            this.Blocks = this.Stream.ReadStructVector<BlockInfo>((uint)(NumberOfBlocks + 1));
        }