Fusion.Engine.Common.AtomCollection.Read C# (CSharp) Method

Read() private method

Reads collection using binary reader.
private Read ( BinaryReader reader ) : void
reader System.IO.BinaryReader
return void
		internal void Read ( BinaryReader reader )
		{
			if (reader.ReadFourCC()!="ATOM") {
				throw new IOException("Bad FourCC. ATOM is expected.");
			}

			//	count:
			int count	=	reader.ReadInt32();

			for ( short i=0; i<count; i++) {
				short idA = reader.ReadInt16();

				short idB = Add( reader.ReadString() );

				if (idA!=idB) {
					throw new IOException("Bad ATOM table.");
				}
			}
		}
	}

Same methods

AtomCollection::Read ( NetIncomingMessage message ) : void