public override void ReadData(byte version, BinaryReader binaryReader) { RecordHeader rh = new RecordHeader(); rh.ReadData(binaryReader); int length = System.Convert.ToInt32(rh.TagLength); actionRecord = binaryReader.ReadBytes(length); //This doesn't read correctly but it reads as good as we need using (BinaryReader b = new BinaryReader(new MemoryStream(actionRecord))) { Flags = b.ReadUInt32(); Name = b.ReadString(); ABCData = b.ReadBytes((int)(b.BaseStream.Length - b.BaseStream.Position)); //Might wrap around } }
public override void ReadData(byte version, BinaryReader binaryReader) { RecordHeader rh = new RecordHeader(); rh.ReadData(binaryReader); }
internal Tag ReadTag() { long posBefore = SWFBinary.BaseStream.Position; RecordHeader rh = new RecordHeader(); rh.ReadData(SWFBinary); int offset = (int)(SWFBinary.BaseStream.Position - posBefore); SWFBinary.BaseStream.Position = posBefore; Tag resTag = null; switch (rh.TagCode) { case (int)TagCodes.DoABC: resTag = new DoABC(); break; case (int)TagCodes.End: resTag = new End(); break; default: resTag = new Tag(SWFBinary.ReadBytes(System.Convert.ToInt32(rh.TagLength + offset))); break; } resTag.ReadData(SWFVersion, SWFBinary); return resTag; }