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


C# BufferedBinaryReader.ReadString方法代码示例

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


在下文中一共展示了BufferedBinaryReader.ReadString方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);

            int tl = System.Convert.ToInt32(rh.TagLength);
            Meta = binaryReader.ReadString();
        }
开发者ID:Berenold,项目名称:SwfExport,代码行数:11,代码来源:MetadataTag.cs

示例2: 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

示例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);

            uint max = rh.TagLength;
            if (version >= 6)
                max--;
            name = binaryReader.ReadString(max);
            if (version >= 6)
               binaryReader.ReadByte();
        }
开发者ID:bladecoding,项目名称:SwfExport,代码行数:15,代码来源:FrameLabelTag.cs

示例4: 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();
            byte fontNameLen = binaryReader.ReadByte();
            fontName = binaryReader.ReadString(fontNameLen);

            binaryReader.ReadUBits(2); //reserved
            fontFlagsSmallText = binaryReader.ReadBoolean();
            fontFlagsShiftJIS = binaryReader.ReadBoolean();
            fontFlagsAINSI = binaryReader.ReadBoolean();
            fontFlagsItalic = binaryReader.ReadBoolean();
            fontFlagsBold = binaryReader.ReadBoolean();
            fontFlagsWildCodes = binaryReader.ReadBoolean();

            uint codeTableLenght = rh.TagLength - 4 - fontNameLen;

            if (!fontFlagsWildCodes)
            {
                codeTable = new uint[codeTableLenght];
                for (int i = 0; i < codeTableLenght; i++)
                    codeTable[i] = (uint)binaryReader.ReadByte();
            }
            else
            {
                codeTable = new uint[codeTableLenght / 2];
                for (int i = 0; i < codeTableLenght / 2; i++)
                    codeTable[i] = (uint)binaryReader.ReadUInt16();
            }
        }
开发者ID:foresightbrand,项目名称:brandqq,代码行数:35,代码来源:DefineFontInfoTag.cs

示例5: 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();
            byte fontNameLen = binaryReader.ReadByte();
            fontName = binaryReader.ReadString(fontNameLen);

            binaryReader.ReadUBits(2); //reserved
            fontFlagsSmallText = binaryReader.ReadBoolean();
            binaryReader.ReadUBits(2); //not used
            fontFlagsItalic = binaryReader.ReadBoolean();
            fontFlagsBold = binaryReader.ReadBoolean();
            binaryReader.ReadBoolean(); //not used

            languageCode = binaryReader.ReadByte();

            long codeTableLenght = rh.TagLength - 5 - fontNameLen;
            codeTable = null;
            codeTable = new ushort[codeTableLenght];
            for (int i = 0; i < codeTableLenght / 2; i++)
                codeTable[i] = binaryReader.ReadUInt16();
        }
开发者ID:bladecoding,项目名称:SwfExport,代码行数:27,代码来源:DefineFontInfo2Tag.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);

            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

示例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);

            characterId = binaryReader.ReadUInt16();
            rect = new Rect();
            rect.ReadData(binaryReader);

            BitArray ba = BitParser.GetBitValues(new byte[1]{ binaryReader.ReadByte() });

            bool hasText = ba.Get(0); //binaryReader.ReadBoolean();
            wordWrap = ba.Get(1); //binaryReader.ReadBoolean();
            multiline = ba.Get(2); //binaryReader.ReadBoolean();
            password = ba.Get(3); //binaryReader.ReadBoolean();
            readOnly = ba.Get(4); //binaryReader.ReadBoolean();
            bool hasTextColor = ba.Get(5); //binaryReader.ReadBoolean();
            bool hasMaxLength = ba.Get(6); //binaryReader.ReadBoolean();
            bool hasFont = ba.Get(7); //binaryReader.ReadBoolean();
            //binaryReader.SynchBits();

            ba = BitParser.GetBitValues(new byte[1]{ binaryReader.ReadByte() });
            //binaryReader.ReadBoolean(); //Reserved
            autoSize = ba.Get(1); //binaryReader.ReadBoolean();
            bool hasLayout = ba.Get(2); //binaryReader.ReadBoolean();
            noSelect = ba.Get(3); //binaryReader.ReadBoolean();
            border = ba.Get(4); //binaryReader.ReadBoolean();
            //binaryReader.ReadBoolean(); //Reserved
            html = ba.Get(6); //binaryReader.ReadBoolean();
            usedOutlines = ba.Get(7); //binaryReader.ReadBoolean();

            if (hasFont)
            {
                fontId = binaryReader.ReadUInt16();
                fontHeight = binaryReader.ReadUInt16();
            }

            if (hasTextColor)
            {
                textColor = new RGBA();
                textColor.ReadData(binaryReader);
            }

            if (hasMaxLength)
                maxLenght = binaryReader.ReadUInt16();

            if (hasLayout)
            {
                align = binaryReader.ReadByte();
                leftMargin = binaryReader.ReadUInt16();
                rightMargin = binaryReader.ReadUInt16();
                indent = binaryReader.ReadUInt16();
                leading = binaryReader.ReadUInt16();
            }

            variableName = binaryReader.ReadString();
            if (hasText)
                initialText = binaryReader.ReadString();
        }
开发者ID:Berenold,项目名称:SwfExport,代码行数:62,代码来源:DefineEditTextTag.cs

示例8: 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);

            binaryReader.ReadByte();
            int lenght = System.Convert.ToInt32(rh.TagLength - 1);
            password = binaryReader.ReadString();
            //char[] password = br.ReadChars(lenght);
        }
开发者ID:bladecoding,项目名称:SwfExport,代码行数:13,代码来源:EnableDebugger2Tag.cs

示例9: 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

示例10: ReadData

 /// <summary>
 /// Reads the data from a binary stream reader.
 /// </summary>
 /// <param name="binaryReader">Binary reader.</param>
 public void ReadData(BufferedBinaryReader binaryReader)
 {
     tag = binaryReader.ReadUInt16();
     name = binaryReader.ReadString();
 }
开发者ID:Berenold,项目名称:SwfExport,代码行数:9,代码来源:Assert.cs

示例11: ReadData

        /// <summary>
        /// Reads the data.
        /// </summary>
        /// <param name="version">Version.</param>
        /// <param name="binaryReader">Binary reader.</param>
        public override void ReadData(byte version, BufferedBinaryReader binaryReader)
        {
            RecordHeader rh = new RecordHeader();
            rh.ReadData(binaryReader);

            url = binaryReader.ReadString();
            ushort count = binaryReader.ReadUInt16();
            exportedCharacters.Clear();
            if (count > 0)
            {
                for (int i = 0; i < count; i++)
                {
                    Assert exportedCharacter = new Assert();
                    exportedCharacter.ReadData(binaryReader);
                    exportedCharacters.Add(exportedCharacter);
                }
            }
        }
开发者ID:foresightbrand,项目名称:brandqq,代码行数:23,代码来源:ImportAssetsTag.cs

示例12: 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);

            bool placeFlagHasClipActions = binaryReader.ReadBoolean();
            bool placeFlagHasClipDepth = binaryReader.ReadBoolean();
            bool placeFlagHasName = binaryReader.ReadBoolean();
            bool placeFlagHasRatio = binaryReader.ReadBoolean();
            bool placeFlagHasColorTransform = binaryReader.ReadBoolean();
            bool placeFlagHasMatrix = binaryReader.ReadBoolean();
            bool placeFlagHasCharacter = binaryReader.ReadBoolean();
            placeFlagMove = binaryReader.ReadBoolean();

            depth = binaryReader.ReadUInt16();
            characterId = 0;
            if (placeFlagHasCharacter)
                characterId = binaryReader.ReadUInt16();
            matrix = null;
            if (placeFlagHasMatrix)
            {
                matrix = new Matrix();
                matrix.ReadData(binaryReader);
            }
            colorTransform = null;
            if (placeFlagHasColorTransform)
            {
                colorTransform = new CXFormWithAlphaData();
                colorTransform.ReadData(binaryReader);
            }
            ratio = 0;
            if (placeFlagHasRatio)
                ratio = binaryReader.ReadUInt16() / 65535.0f;
            name = null;
            if (placeFlagHasName)
                name = binaryReader.ReadString();
            clipDepth = 0;
            if (placeFlagHasClipDepth)
                clipDepth = binaryReader.ReadUInt16();

            // get bytecode actions
            clipActions = null;
            if (placeFlagHasClipActions)
            {
                // different behaviour for Flash 6+
                actionHead = (version>=6) ? binaryReader.ReadBytes(6) : binaryReader.ReadBytes(4);
                // read clip action records to list
                ArrayList clpAc = new ArrayList();
                //ClipActionRec a = null;
                bool res = true;
                do
                {
                    ClipActionRec action = new ClipActionRec();
                    res = action.ReadData(binaryReader, version);
                    if (res)
                        clpAc.Add(action);
                }
                while (res);
                // copy list to array
                clipActions = new ClipActionRec[clpAc.Count];
                clpAc.CopyTo(clipActions,0);
            }
        }
开发者ID:foresightbrand,项目名称:brandqq,代码行数:66,代码来源:PlaceObject2Tag.cs


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