當前位置: 首頁>>代碼示例>>C#>>正文


C# RecordInputStream.ReadLong方法代碼示例

本文整理匯總了C#中NPOI.HSSF.Record.RecordInputStream.ReadLong方法的典型用法代碼示例。如果您正苦於以下問題:C# RecordInputStream.ReadLong方法的具體用法?C# RecordInputStream.ReadLong怎麽用?C# RecordInputStream.ReadLong使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在NPOI.HSSF.Record.RecordInputStream的用法示例。


在下文中一共展示了RecordInputStream.ReadLong方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: OldFormulaRecord

        public OldFormulaRecord(RecordInputStream ris) :
            base(ris, ris.Sid == biff2_sid)
        {
            ;

            if (IsBiff2)
            {
                field_4_value = ris.ReadDouble();
            }
            else
            {
                long valueLongBits = ris.ReadLong();
                specialCachedValue = SpecialCachedValue.Create(valueLongBits);
                if (specialCachedValue == null)
                {
                    field_4_value = BitConverter.Int64BitsToDouble(valueLongBits);
                }
            }

            if (IsBiff2)
            {
                field_5_options = (short)ris.ReadUByte();
            }
            else
            {
                field_5_options = ris.ReadShort();
            }

            int expression_len = ris.ReadShort();
            int nBytesAvailable = ris.Available();
            field_6_Parsed_expr = Formula.Read(expression_len, ris, nBytesAvailable);
        }
開發者ID:Reinakumiko,項目名稱:npoi,代碼行數:32,代碼來源:OldFormulaRecord.cs

示例2: SheetExtRecord

 public SheetExtRecord(RecordInputStream in1)
 {
     rt = in1.ReadShort();
     if (rt != 0x0862)
     {
         throw new ArgumentException("frtHeader.rt must be equals 0x0862 in SheetExt record");
     }
     grbitFrt = in1.ReadShort();
     in1.ReadInt();  //reserved
     in1.ReadInt();  //reserved
     cb = in1.ReadInt();
     optionflag = in1.ReadShort();
     in1.ReadShort(); //reserved
     if (cb == 0x28)
     {
         optionflag2 = in1.ReadShort();
         xclrType = in1.ReadInt();
         xclrValue = in1.ReadInt();
         numTint = in1.ReadLong();
         in1.ReadShort();
     }
 }
開發者ID:Henry-T,項目名稱:UnityPG,代碼行數:22,代碼來源:SheetExtRecord.cs

示例3: ReadAConstantValue

 private static object ReadAConstantValue(RecordInputStream in1)
 {
     byte grbit = (byte)in1.ReadByte();
     switch (grbit)
     {
         case TYPE_EMPTY:
             in1.ReadLong(); // 8 byte 'not used' field
             return EMPTY_REPRESENTATION;
         case TYPE_NUMBER:
             return in1.ReadDouble();
         case TYPE_STRING:
             return in1.ReadUnicodeString();
         case TYPE_bool:
             return ReadBoolean(in1);
         case TYPE_ERROR_CODE:
             int errCode = in1.ReadUShort();
             // next 6 bytes are Unused
             in1.ReadUShort();
             in1.ReadInt();
             return ErrorConstant.ValueOf(errCode);
     }
     throw new Exception("Unknown grbit value (" + grbit + ")");
 }
開發者ID:ChiangHanLung,項目名稱:PIC_VDS,代碼行數:23,代碼來源:ConstantValueParser.cs

示例4: FormulaRecord

        /**
         * Constructs a Formula record and Sets its fields appropriately.
         * Note - id must be 0x06 (NOT 0x406 see MSKB #Q184647 for an 
         * "explanation of this bug in the documentation) or an exception
         *  will be throw upon validation
         *
         * @param in the RecordInputstream to Read the record from
         */

        public FormulaRecord(RecordInputStream in1):base(in1)
        {
		        long valueLongBits  = in1.ReadLong();
		        field_5_options = in1.ReadShort();
		        specialCachedValue = SpecialCachedValue.Create(valueLongBits);
		        if (specialCachedValue == null) {
			        field_4_value = BitConverter.Int64BitsToDouble(valueLongBits);
		        }

                field_6_zero = in1.ReadInt();
                int field_7_expression_len = in1.ReadShort();

                field_8_parsed_expr = NPOI.SS.Formula.Formula.Read(field_7_expression_len, in1,in1.Available());
        }
開發者ID:WPG,項目名稱:npoi,代碼行數:23,代碼來源:FormulaRecord.cs

示例5: ReadBoolean

 private static Object ReadBoolean(RecordInputStream in1)
 {
     byte val = (byte)in1.ReadLong(); // 7 bytes 'not used'
     switch (val)
     {
         case FALSE_ENCODING:
             return false;
         case TRUE_ENCODING:
             return true;
     }
     // Don't tolerate Unusual bool encoded values (unless it becomes evident that they occur)
     throw new Exception("unexpected bool encoding (" + val + ")");
 }
開發者ID:ChiangHanLung,項目名稱:PIC_VDS,代碼行數:13,代碼來源:ConstantValueParser.cs

示例6: FormulaRecord

        /**
         * Constructs a Formula record and Sets its fields appropriately.
         * Note - id must be 0x06 (NOT 0x406 see MSKB #Q184647 for an 
         * "explanation of this bug in the documentation) or an exception
         *  will be throw upon validation
         *
         * @param in the RecordInputstream to Read the record from
         */

        public FormulaRecord(RecordInputStream in1)
        {
            try
            {
                field_1_row = in1.ReadUShort();
		        field_2_column  = in1.ReadUShort();
		        field_3_xf	  = in1.ReadShort();
		        long valueLongBits  = in1.ReadLong();
		        field_5_options = in1.ReadShort();
		        specialCachedValue = SpecialCachedValue.Create(valueLongBits);
		        if (specialCachedValue == null) {
			        field_4_value = BitConverter.Int64BitsToDouble(valueLongBits);
		        }

                field_6_zero = in1.ReadInt();
                int field_7_expression_len = in1.ReadShort();
                field_8_parsed_expr = Ptg.ReadTokens(field_7_expression_len, in1);
                if (in1.Remaining == 10) {
			        // TODO - this seems to occur when IntersectionPtg is present
			        // 10 extra bytes are just 0x01 and 0x00
			        // This causes POI stderr: "WARN. Unread 10 bytes of record 0x6"
		        }
            }
            catch (InvalidOperationException uoe)
            {
                throw new RecordFormatException(uoe);
            }
            if (in1.Remaining == 10)
            {
                // TODO - this seems to occur when IntersectionPtg Is present
                // 10 extra bytes are just 0x01 and 0x00
                // This causes POI stderr: "WARN. UnRead 10 bytes of record 0x6"
            }
        }
開發者ID:ChiangHanLung,項目名稱:PIC_VDS,代碼行數:43,代碼來源:FormulaRecord.cs


注:本文中的NPOI.HSSF.Record.RecordInputStream.ReadLong方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。