本文整理汇总了C#中NPOI.HSSF.Record.RecordInputStream.ReadByte方法的典型用法代码示例。如果您正苦于以下问题:C# RecordInputStream.ReadByte方法的具体用法?C# RecordInputStream.ReadByte怎么用?C# RecordInputStream.ReadByte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NPOI.HSSF.Record.RecordInputStream
的用法示例。
在下文中一共展示了RecordInputStream.ReadByte方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FontRecord
/**
* Constructs a Font record and Sets its fields appropriately.
*
* @param in the RecordInputstream to Read the record from
*/
public FontRecord(RecordInputStream in1)
{
field_1_font_height = in1.ReadShort();
field_2_attributes = in1.ReadShort();
field_3_color_palette_index = in1.ReadShort();
field_4_bold_weight = in1.ReadShort();
field_5_base_sub_script = in1.ReadShort();
field_6_underline = (byte)in1.ReadByte();
field_7_family = (byte)in1.ReadByte();
field_8_charset = (byte)in1.ReadByte();
field_9_zero = (byte)in1.ReadByte();
int field_10_font_name_len = (byte)in1.ReadByte();
int unicodeFlags = in1.ReadUByte(); // options byte present always (even if no character data)
if (field_10_font_name_len > 0)
{
if (unicodeFlags == 0)
{ // Is compressed Unicode
field_11_font_name = in1.ReadCompressedUnicode(field_10_font_name_len);
}
else
{ // Is not compressed Unicode
field_11_font_name = in1.ReadUnicodeLEString(field_10_font_name_len);
}
}
else
{
field_11_font_name = "";
}
}
示例2: StyleRecord
/**
* Constructs a Style record and Sets its fields appropriately.
* @param in the RecordInputstream to Read the record from
*/
public StyleRecord(RecordInputStream in1)
{
fHighByte = BitFieldFactory.GetInstance(0x01); //have to init here, since we are being called
//from base, and class level init hasnt been done.
field_1_xf_index = in1.ReadShort();
if (Type == STYLE_BUILT_IN)
{
field_2_builtin_style = (byte)in1.ReadByte();
field_3_outline_style_level = (byte)in1.ReadByte();
}
else if (Type == STYLE_USER_DEFINED)
{
field_2_name_length = in1.ReadShort();
// Some files from Crystal Reports lack
// the remaining fields, which Is naughty
if (in1.Remaining > 0)
{
field_3_string_options = (byte)in1.ReadByte();
byte[] str = in1.ReadRemainder();
if (fHighByte.IsSet(field_3_string_options))
{
field_4_name = StringUtil.GetFromUnicodeBE(str, 0, field_2_name_length);
}
else
{
field_4_name = StringUtil.GetFromCompressedUnicode(str, 0, field_2_name_length);
}
}
}
// todo sanity Check exception to make sure we're one or the other
}
示例3: CRNRecord
public CRNRecord(RecordInputStream in1)
{
field_1_last_column_index = in1.ReadByte() & 0x00FF;
field_2_first_column_index = in1.ReadByte() & 0x00FF;
field_3_row_index = in1.ReadShort();
int nValues = field_1_last_column_index - field_2_first_column_index + 1;
field_4_constant_values = ConstantValueParser.Parse(in1, nValues);
}
示例4: SeriesTextRecord
/**
* Constructs a SeriesText record and Sets its fields appropriately.
*
* @param in the RecordInputstream to Read the record from
*/
public SeriesTextRecord(RecordInputStream in1)
{
field_1_id = in1.ReadShort();
field_2_textLength = (byte)in1.ReadByte();
field_3_undocumented = (byte)in1.ReadByte();
field_4_text = in1.ReadUnicodeLEString(field_2_textLength);
}
示例5: BoolErrRecord
/**
* Constructs a BoolErr record and Sets its fields appropriately.
*
* @param in the RecordInputstream to Read the record from
*/
public BoolErrRecord(RecordInputStream in1)
{
field_1_row = in1.ReadUShort();
field_2_column = in1.ReadUShort();
field_3_xf_index = in1.ReadShort();
field_4_bBoolErr = (byte)in1.ReadByte();
field_5_fError = (byte)in1.ReadByte();
}
示例6: MMSRecord
/**
* Constructs a MMS record and Sets its fields appropriately.
* @param in the RecordInputstream to Read the record from
*/
public MMSRecord(RecordInputStream in1)
{
if (in1.Remaining == 0)
{
return;
}
field_1_AddMenuCount = (byte)in1.ReadByte();
field_2_delMenuCount = (byte)in1.ReadByte();
}
示例7: TableRecord
public TableRecord(RecordInputStream in1)
: base(in1)
{
field_5_flags = in1.ReadByte();
field_6_res = in1.ReadByte();
field_7_rowInputRow = in1.ReadShort();
field_8_colInputRow = in1.ReadShort();
field_9_rowInputCol = in1.ReadShort();
field_10_colInputCol = in1.ReadShort();
}
示例8: LegendRecord
/**
* Constructs a Legend record and Sets its fields appropriately.
*
* @param in the RecordInputstream to Read the record from
*/
public LegendRecord(RecordInputStream in1)
{
field_1_xAxisUpperLeft = in1.ReadInt();
field_2_yAxisUpperLeft = in1.ReadInt();
field_3_xSize = in1.ReadInt();
field_4_ySize = in1.ReadInt();
field_5_type = (byte)in1.ReadByte();
field_6_spacing = (byte)in1.ReadByte();
field_7_options = in1.ReadShort();
}
示例9: ChartFRTInfoRecord
public ChartFRTInfoRecord(RecordInputStream in1)
{
rt = in1.ReadShort();
grbitFrt = in1.ReadShort();
verOriginator = (byte)in1.ReadByte();
verWriter = (byte)in1.ReadByte();
int cCFRTID = in1.ReadShort();
rgCFRTID = new CFRTID[cCFRTID];
for (int i = 0; i < cCFRTID; i++)
{
rgCFRTID[i] = new CFRTID(in1);
}
}
示例10: FileSharingRecord
/**
* Constructs a FileSharing record and Sets its fields appropriately.
* @param in the RecordInputstream to Read the record from
*/
public FileSharingRecord(RecordInputStream in1)
{
field_1_Readonly = in1.ReadShort();
field_2_password = in1.ReadShort();
int nameLen = in1.ReadShort();
if (nameLen > 0)
{
// TODO - Current examples(3) from junits only have zero Length username.
field_3_username_unicode_options = (byte)in1.ReadByte();
field_3_username_value = in1.ReadCompressedUnicode(nameLen);
if (field_3_username_value == null)
{
// In some cases the user name can be null after reading from
// the input stream so we make sure this has a value
field_3_username_value = "";
}
}
else
{
field_3_username_value = "";
}
}
示例11: FeatRecord
public FeatRecord(RecordInputStream in1)
{
futureHeader = new FtrHeader(in1);
isf_sharedFeatureType = in1.ReadShort();
reserved1 = (byte)in1.ReadByte();
reserved2 = in1.ReadInt();
int cref = in1.ReadUShort();
cbFeatData = in1.ReadInt();
reserved3 = in1.ReadShort();
cellRefs = new CellRangeAddress[cref];
for (int i = 0; i < cellRefs.Length; i++)
{
cellRefs[i] = new CellRangeAddress(in1);
}
switch (isf_sharedFeatureType)
{
case FeatHdrRecord.SHAREDFEATURES_ISFPROTECTION:
sharedFeature = new FeatProtection(in1);
break;
case FeatHdrRecord.SHAREDFEATURES_ISFFEC2:
sharedFeature = new FeatFormulaErr2(in1);
break;
case FeatHdrRecord.SHAREDFEATURES_ISFFACTOID:
sharedFeature = new FeatSmartTag(in1);
break;
default:
System.Console.WriteLine("Unknown Shared Feature " + isf_sharedFeatureType + " found!");
break;
}
}
示例12: LabelRecord
/**
* Constructs an Label record and Sets its fields appropriately.
*
* @param in the RecordInputstream to Read the record from
*/
public LabelRecord(RecordInputStream in1)
{
field_1_row = in1.ReadUShort();
field_2_column = in1.ReadUShort();
field_3_xf_index = in1.ReadShort();
field_4_string_len = in1.ReadShort();
field_5_unicode_flag = (byte)in1.ReadByte();
if (field_4_string_len > 0)
{
if (IsUncompressedUnicode)
{
field_6_value = in1.ReadUnicodeLEString(field_4_string_len);
}
else
{
field_6_value = in1.ReadCompressedUnicode(field_4_string_len);
}
}
else
{
field_6_value = "";
}
if (in1.Remaining > 0)
{
logger.Log(POILogger.INFO, "LabelRecord data remains: " +in1.Remaining +
" : " + HexDump.ToHex(in1.ReadRemainder()));
}
}
示例13: ColumnInfoRecord
/**
* Constructs a ColumnInfo record and Sets its fields appropriately
* @param in the RecordInputstream to Read the record from
*/
public ColumnInfoRecord(RecordInputStream in1)
{
_first_col = in1.ReadUShort();
_last_col = in1.ReadUShort();
_col_width = in1.ReadUShort();
_xf_index = in1.ReadUShort();
_options = in1.ReadUShort();
switch (in1.Remaining)
{
case 2: // usual case
field_6_reserved = in1.ReadUShort();
break;
case 1:
// often COLINFO Gets encoded 1 byte short
// shouldn't matter because this field Is Unused
field_6_reserved = in1.ReadByte();
break;
case 0:
// According to bugzilla 48332,
// "SoftArtisans OfficeWriter for Excel" totally skips field 6
// Excel seems to be OK with this, and assumes zero.
field_6_reserved = 0;
break;
default:
throw new Exception("Unusual record size remaining=(" + in1.Remaining + ")");
}
}
示例14: BoolErrRecord
/**
* Constructs a BoolErr record and Sets its fields appropriately.
*
* @param in the RecordInputstream to Read the record from
*/
public BoolErrRecord(RecordInputStream in1)
: base(in1)
{
switch (in1.Remaining)
{
case 2:
_value = in1.ReadByte();
break;
case 3:
_value = in1.ReadUShort();
break;
default:
throw new RecordFormatException("Unexpected size ("
+ in1.Remaining + ") for BOOLERR record.");
}
int flag = in1.ReadUByte();
switch (flag)
{
case 0:
_isError = false;
break;
case 1:
_isError = true;
break;
default:
throw new RecordFormatException("Unexpected isError flag ("
+ flag + ") for BOOLERR record.");
}
}
示例15: TickRecord
/**
* Constructs a Tick record and Sets its fields appropriately.
*
* @param in the RecordInputstream to Read the record from
*/
public TickRecord(RecordInputStream in1)
{
field_1_majorTickType = (byte)in1.ReadByte();
field_2_minorTickType = (byte)in1.ReadByte();
field_3_labelPosition = (byte)in1.ReadByte();
field_4_background = (byte)in1.ReadByte();
field_5_labelColorRgb = (byte)in1.ReadInt();
field_6_zero1 = in1.ReadInt();
field_7_zero2 = in1.ReadInt();
field_8_zero3 = in1.ReadInt();
field_9_zero4 = in1.ReadInt();
field_10_options = in1.ReadShort();
field_11_tickColor = in1.ReadShort();
field_12_zero5 = in1.ReadShort();
}