ReadUInt32() public méthode

Reads an Unsigned int32.
public ReadUInt32 ( ) : uint
Résultat uint
Exemple #1
0
        /// <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();
        }
Exemple #2
0
 /// <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();
 }
        /// <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);
        }
Exemple #4
0
        /// <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();
            }
        }
Exemple #5
0
        /// <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();
        }
        /// <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);
            }
        }
Exemple #7
0
        /// <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);
                }
            }
        }
Exemple #8
0
 /// <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();
 }
Exemple #9
0
        /// <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);
                    }
                }
            }
        }
Exemple #10
0
 /// <summary>
 /// Reads the data.
 /// </summary>
 /// <param name="binaryReader">Binary reader.</param>
 public void ReadData(BufferedBinaryReader binaryReader)
 {
     this.pos44 = binaryReader.ReadUInt32();
     this.leftLevel = binaryReader.ReadUInt16();
     this.rightLevel = binaryReader.ReadUInt16();
 }