本文整理汇总了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();
}
示例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();
}
示例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);
}
示例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();
}
}
示例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();
}
示例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);
}
}
示例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);
}
}
}
示例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();
}
示例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);
}
}
}
}