public override void ParseData(BinaryReader br) { /* * StringBuilder hex = new StringBuilder(data.Length * 2); * foreach (byte b in data) * hex.AppendFormat("{0:x2}", b); * Log(hex.ToString()); */ m_vShapeId = br.ReadInt16(); //0000 br.ReadUInt16(); //0100 br.ReadUInt16(); //0400 if datatype 18 while (true) { byte chunkType; while (true) { chunkType = br.ReadByte(); //11 m_vLength = br.ReadInt32(); //32000000 if (chunkType == 17 || chunkType == 22) { ShapeChunk chunk = new ShapeChunk(m_vStorageObject); chunk.SetChunkId((short)m_vChunks.Count); chunk.SetShapeId(m_vShapeId); chunk.SetChunkType(chunkType); chunk.ParseData(br); m_vChunks.Add(chunk); } else { break; } } if (chunkType == 0) { break; } Log("Unmanaged chunk type " + chunkType); br.ReadBytes(m_vLength); } }
public override void ParseData(BinaryReader br) { /* StringBuilder hex = new StringBuilder(data.Length * 2); foreach (byte b in data) hex.AppendFormat("{0:x2}", b); Debug.WriteLine(hex.ToString()); */ m_vShapeId = br.ReadInt16();//0000 br.ReadUInt16();//0100 br.ReadUInt16();//0400 if datatype 18 while(true) { byte chunkType; while (true) { chunkType = br.ReadByte();//11 m_vLength = br.ReadInt32();//32000000 if (chunkType == 17 || chunkType == 22) { ShapeChunk chunk = new ShapeChunk(m_vStorageObject); chunk.SetChunkId((short)m_vChunks.Count); chunk.SetShapeId(m_vShapeId); chunk.SetChunkType(chunkType); chunk.ParseData(br); m_vChunks.Add(chunk); } else { break; } } if (chunkType == 0) break; Debug.WriteLine("Unmanaged chunk type " + chunkType); br.ReadBytes(m_vLength); } }