当前位置: 首页>>代码示例>>C#>>正文


C# BufferedBinaryReader.ReadUInt32方法代码示例

本文整理汇总了C#中SwfDotNet.IO.Utils.BufferedBinaryReader.ReadUInt32方法的典型用法代码示例。如果您正苦于以下问题:C# BufferedBinaryReader.ReadUInt32方法的具体用法?C# BufferedBinaryReader.ReadUInt32怎么用?C# BufferedBinaryReader.ReadUInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SwfDotNet.IO.Utils.BufferedBinaryReader的用法示例。


在下文中一共展示了BufferedBinaryReader.ReadUInt32方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ReadData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void ReadData(byte version, BufferedBinaryReader binaryReader)
        {
            RecordHeader rh = new RecordHeader();
            rh.ReadData(binaryReader);

            soundId = binaryReader.ReadUInt16();

            soundFormat = binaryReader.ReadUBits(4);
            soundRate = binaryReader.ReadUBits(2);
            soundSize = binaryReader.ReadUBits(1);
            soundType = binaryReader.ReadUBits(1);

            soundSampleCount = binaryReader.ReadUInt32();

            uint size = rh.TagLength - 2 - 1 - 4;
            soundData = new byte[size];
            for (uint i = 0; i < size; i++)
                soundData[i] = binaryReader.ReadByte();
        }
开发者ID:Berenold,项目名称:SwfExport,代码行数:22,代码来源:DefineSoundTag.cs

示例2: ReadData

 /// <summary>
 /// Reads the data.
 /// </summary>
 /// <param name="version">Version.</param>
 /// <param name="binaryReader">Binary reader.</param>
 public virtual void ReadData(byte version, BufferedBinaryReader binaryReader)
 {
     this.tagType = (FlvTagCodeEnum)binaryReader.ReadByte();
     this.dataSize = binaryReader.ReadUBits(24);
     this.timeStamp = binaryReader.ReadUBits(24);
     binaryReader.ReadUInt32();
 }
开发者ID:bladecoding,项目名称:SwfExport,代码行数:12,代码来源:FlvBaseTag.cs

示例3: ReadData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void ReadData(byte version, BufferedBinaryReader binaryReader)
        {
            RecordHeader rh = new RecordHeader();
            rh.ReadData(binaryReader);

            characterId = binaryReader.ReadUInt16();
            binaryReader.SynchBits();

            startBounds = new Rect();
            startBounds.ReadData(binaryReader);

            binaryReader.SynchBits();
            endBounds = new Rect();
            endBounds.ReadData(binaryReader);
            binaryReader.SynchBits();

            offset = binaryReader.ReadUInt32();

            morphFillStyles = new MorphFillStyleCollection();
            morphFillStyles.ReadData(binaryReader);

            morphLineStyles = new MorphLineStyleCollection();
            morphLineStyles.ReadData(binaryReader);

            ShapeWithStyle.NumFillBits = (uint)morphFillStyles.Count;
            ShapeWithStyle.NumLineBits = (uint)morphLineStyles.Count;

            startEdges = new ShapeRecordCollection();
            startEdges.ReadData(binaryReader, ShapeType.None);

            ShapeWithStyle.NumFillBits = (uint)morphFillStyles.Count;
            ShapeWithStyle.NumLineBits = (uint)morphLineStyles.Count;

            endEdges = new ShapeRecordCollection();
            endEdges.ReadData(binaryReader, ShapeType.None);
        }
开发者ID:Berenold,项目名称:SwfExport,代码行数:39,代码来源:DefineMorphShapeTag.cs

示例4: ReadData

        /// <summary>
        /// Reads the data from a binary file
        /// </summary>
        /// <param name="binaryReader">Binary reader.</param>
        public void ReadData(BufferedBinaryReader binaryReader)
        {
            ushort tagCL = binaryReader.ReadUInt16();
            tagCode = Convert.ToUInt16(tagCL >> 6);
            tagLength = System.Convert.ToUInt32(tagCL - (tagCode << 6));

            bool longTag;

            if (tagLength == 0x3F)
            {
                uint len = binaryReader.ReadUInt32();
                tagLength = len;
                longTag = (tagLength <= 127);
            }
            else
            {
                longTag = false;
            }

            if (tagLength > binaryReader.BaseStream.Length)
            {
                throw new InvalidTagLengthException();
            }
        }
开发者ID:Berenold,项目名称:SwfExport,代码行数:28,代码来源:RecordHeader.cs

示例5: ReadData

        /// <summary>
        /// Reads the data from a binary file
        /// </summary>
        /// <param name="binaryReader">Binary reader.</param>
        public void ReadData(BufferedBinaryReader binaryReader)
        {
            this.signature = binaryReader.ReadString(3);
            this.version = binaryReader.ReadByte();

            if (this.version > MAX_VERSION)
                throw new InvalidSwfVersionException(this.version, MAX_VERSION);

            this.fileSize = binaryReader.ReadUInt32();
            this.rect = new Rect();
            this.rect.ReadData(binaryReader);
            binaryReader.SynchBits();
            this.fps = binaryReader.ReadFloatWord(8, 8);
            this.frames = binaryReader.ReadUInt16();
        }
开发者ID:foresightbrand,项目名称:brandqq,代码行数:19,代码来源:SwfHeader.cs

示例6: ReadData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void ReadData(byte version, BufferedBinaryReader binaryReader)
        {
            RecordHeader rh = new RecordHeader();
            rh.ReadData(binaryReader);

            int tl = System.Convert.ToInt32(rh.TagLength);
            characterId = binaryReader.ReadUInt16();
            int imgLen = Convert.ToInt32(binaryReader.ReadUInt32());
            if (imgLen > 0)
            {
                jpegData = binaryReader.ReadBytes(imgLen);
                alphaData = binaryReader.ReadBytes(tl - 6 - imgLen);
            }
        }
开发者ID:bladecoding,项目名称:SwfExport,代码行数:17,代码来源:DefineBitsJpeg3Tag.cs

示例7: ReadData

        /// <summary>
        /// see <see cref="SwfDotNet.IO.Tags.BaseTag">base class</see>
        /// </summary>
        public override void ReadData(byte version, BufferedBinaryReader binaryReader)
        {
            RecordHeader rh = new RecordHeader();
            rh.ReadData(binaryReader);

            fontId = binaryReader.ReadUInt16();

            bool fontFlagsHasLayout = binaryReader.ReadBoolean();
            fontFlagsShiftJIS = binaryReader.ReadBoolean();
            fontFlagsSmallText = binaryReader.ReadBoolean();
            fontFlagsANSI = binaryReader.ReadBoolean();
            bool fontFlagsWideOffsets = binaryReader.ReadBoolean();
            bool fontFlagsWideCodes = binaryReader.ReadBoolean();
            fontFlagsItalic = binaryReader.ReadBoolean();
            fontFlagsBold = binaryReader.ReadBoolean();
            languageCode = (LanguageCode)binaryReader.ReadByte();
            byte fontNameLength = binaryReader.ReadByte();

            fontName = binaryReader.ReadString(fontNameLength);

            ushort numGlyphs = binaryReader.ReadUInt16();

            if (numGlyphs > 0)
            {
                uint[] offsetTable = new uint[numGlyphs];
                for (int i = 0; i < numGlyphs; i++)
                {
                    if (fontFlagsWideOffsets)
                        offsetTable[i] = binaryReader.ReadUInt32();
                    else
                        offsetTable[i] = (uint)binaryReader.ReadUInt16();
                }
            }
            uint codeTableOffset = 0;
            if (fontFlagsWideOffsets)
                codeTableOffset = binaryReader.ReadUInt32();
            else
                codeTableOffset = (uint)binaryReader.ReadUInt16();

            if (numGlyphs > 0)
            {
                this.glyphShapesTable.IsWideCodes = fontFlagsWideCodes;
                this.glyphShapesTable.ReadData(binaryReader, numGlyphs);
            }

            if (fontFlagsHasLayout)
            {
                fontAscent = binaryReader.ReadInt16();
                fontDescent = binaryReader.ReadInt16();
                fontLeading = binaryReader.ReadInt16();

                if (numGlyphs > 0)
                {
                    fontAdvanceTable.ReadData(binaryReader, numGlyphs);
                    fontBoundsTable.ReadData(binaryReader, numGlyphs);
                    fontKerningTable.ReadData(binaryReader, fontFlagsWideCodes);
                }
            }
        }
开发者ID:Berenold,项目名称:SwfExport,代码行数:62,代码来源:DefineFont2Tag.cs

示例8: ReadData

 /// <summary>
 /// Reads the data.
 /// </summary>
 /// <param name="reader">Reader.</param>
 public void ReadData(BufferedBinaryReader reader)
 {
     this.signature = reader.ReadString(3);
     this.version = reader.ReadByte();
     reader.ReadUBits(5);
     this.hasAudio = reader.ReadBoolean();
     reader.ReadBoolean();
     this.hasVideo = reader.ReadBoolean();
     reader.ReadUInt32();
 }
开发者ID:bladecoding,项目名称:SwfExport,代码行数:14,代码来源:FlvHeader.cs

示例9: ReadData

        /// <summary>
        /// Reads the data.
        /// </summary>
        /// <param name="binaryReader">Binary reader.</param>
        public void ReadData(BufferedBinaryReader binaryReader)
        {
            binaryReader.ReadUBits(2);

            syncStop = binaryReader.ReadBoolean();
            syncNoMultiple = binaryReader.ReadBoolean();
            bool hasEnvelope = binaryReader.ReadBoolean();
            bool hasLoops = binaryReader.ReadBoolean();
            bool hasOutPoint = binaryReader.ReadBoolean();
            bool hasInPoint = binaryReader.ReadBoolean();

            if (hasInPoint)
                inPoint = binaryReader.ReadUInt32();
            if (hasOutPoint)
                outPoint = binaryReader.ReadUInt32();
            if (hasLoops)
                loopCount = binaryReader.ReadUInt16();
            if (hasEnvelope)
            {
                byte envPoints = binaryReader.ReadByte();
                if (envPoints != 0)
                {
                    envelopeRecord.Clear();
                    for (int i = 0; i < envPoints; i++)
                    {
                        SoundEnvelope envelope = new SoundEnvelope();
                        envelope.ReadData(binaryReader);
                        envelopeRecord.Add(envelope);
                    }
                }
            }
        }
开发者ID:foresightbrand,项目名称:brandqq,代码行数:36,代码来源:Sound.cs


注:本文中的SwfDotNet.IO.Utils.BufferedBinaryReader.ReadUInt32方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。