本文整理汇总了C#中ILittleEndianInput.ReadUByte方法的典型用法代码示例。如果您正苦于以下问题:C# ILittleEndianInput.ReadUByte方法的具体用法?C# ILittleEndianInput.ReadUByte怎么用?C# ILittleEndianInput.ReadUByte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ILittleEndianInput
的用法示例。
在下文中一共展示了ILittleEndianInput.ReadUByte方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StringPtg
/** Create a StringPtg from a stream */
public StringPtg(ILittleEndianInput in1)
{
int field_1_length = in1.ReadUByte();
field_2_options = (byte)in1.ReadByte();
_is16bitUnicode = (field_2_options & 0x01) != 0;
if (_is16bitUnicode)
{
field_3_string = StringUtil.ReadUnicodeLE(in1, field_1_length);
}
else
{
field_3_string = StringUtil.ReadCompressedUnicode(in1, field_1_length);
}
}
示例2: FinishReading
/**
* Read in the actual token (array) values. This occurs
* AFTER the last Ptg in the expression.
* See page 304-305 of Excel97-2007BinaryFileFormat(xls)Specification.pdf
*/
public ArrayPtg FinishReading(ILittleEndianInput in1)
{
int nColumns = in1.ReadUByte();
short nRows = in1.ReadShort();
//The token_1_columns and token_2_rows do not follow the documentation.
//The number of physical rows and columns is actually +1 of these values.
//Which is not explicitly documented.
nColumns++;
nRows++;
int totalCount = nRows * nColumns;
Object[] arrayValues = ConstantValueParser.Parse(in1, totalCount);
ArrayPtg result = new ArrayPtg(_reserved0, _reserved1, _reserved2, nColumns, nRows, arrayValues);
result.PtgClass = this.PtgClass;
return result;
}
示例3: Initial
public Initial(ILittleEndianInput in1)
{
_reserved0 = in1.ReadInt();
_reserved1 = in1.ReadUShort();
_reserved2 = in1.ReadUByte();
}
示例4: ReadCompressedUnicode
public static String ReadCompressedUnicode(ILittleEndianInput in1, int nChars)
{
char[] buf = new char[nChars];
for (int i = 0; i < buf.Length; i++)
{
buf[i] = (char)in1.ReadUByte();
}
return new String(buf);
}