当前位置: 首页>>代码示例>>C#>>正文


C# Record.RecordInputStream类代码示例

本文整理汇总了C#中NPOI.HSSF.Record.RecordInputStream的典型用法代码示例。如果您正苦于以下问题:C# RecordInputStream类的具体用法?C# RecordInputStream怎么用?C# RecordInputStream使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RecordInputStream类属于NPOI.HSSF.Record命名空间,在下文中一共展示了RecordInputStream类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FillField

        public int FillField(RecordInputStream in1)
        {
            short tokenSize = in1.ReadShort();
            formulaTokens = Ptg.ReadTokens(tokenSize, in1);

            return tokenSize + 2;
        }
开发者ID:babywzazy,项目名称:Server,代码行数:7,代码来源:LinkedDataFormulaField.cs

示例2: 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;
            }
        }
开发者ID:hanwangkun,项目名称:npoi,代码行数:33,代码来源:FeatRecord.cs

示例3: 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 = "";
            }
        }
开发者ID:JnS-Software-LLC,项目名称:npoi,代码行数:30,代码来源:FileSharingRecord.cs

示例4: 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

示例5: StreamEncryptionInfo

			public StreamEncryptionInfo(RecordInputStream rs, List<Record> outputRecs)
			{
				Record rec;
				rs.NextRecord();
				int recSize = 4 + rs.Remaining;
				rec = RecordFactory.CreateSingleRecord(rs);
				outputRecs.Add(rec);
				FilePassRecord fpr = null;
				if (rec is BOFRecord)
				{
					_hasBOFRecord = true;
					// Fetch the next record, and see if it indicates whether
					//  the document is encrypted or not
					if (rs.HasNextRecord)
					{
						rs.NextRecord();
						rec = RecordFactory.CreateSingleRecord(rs);
						recSize += rec.RecordSize;
						outputRecs.Add(rec);
						// Encrypted is normally BOF then FILEPASS
						// May sometimes be BOF, WRITEPROTECT, FILEPASS
						if (rec is WriteProtectRecord && rs.HasNextRecord)
						{
							rs.NextRecord();
							rec = RecordFactory.CreateSingleRecord(rs);
							recSize += rec.RecordSize;
							outputRecs.Add(rec);
						}
						// If it's a FILEPASS, track it specifically but
						//  don't include it in the main stream
						if (rec is FilePassRecord)
						{
							fpr = (FilePassRecord)rec;
							outputRecs.RemoveAt(outputRecs.Count - 1);
							// TODO - add fpr not Added to outPutRecs
							rec = outputRecs[0];
						}
						else
						{
							// workbook not encrypted (typical case)
							if (rec is EOFRecord)
							{
								// A workbook stream is never empty, so crash instead
								// of trying to keep track of nesting level
								throw new InvalidOperationException("Nothing between BOF and EOF");
							}
						}
					}
				}
				else
				{
					// Invalid in a normal workbook stream.
					// However, some test cases work on sub-sections of
					// the workbook stream that do not begin with BOF
					_hasBOFRecord = false;
				}
				_InitialRecordsSize = recSize;
				_filePassRec = fpr;
				_lastRecord = rec;
			}
开发者ID:rohatsu,项目名称:npoi,代码行数:60,代码来源:RecordFactoryInputStream.cs

示例6: LabelSSTRecord

        /**
         * Constructs an LabelSST record and Sets its fields appropriately.
         * @param in the RecordInputstream to Read the record from
         */

        public LabelSSTRecord(RecordInputStream in1)
        {
            field_1_row = in1.ReadUShort();
            field_2_column = in1.ReadUShort();
            field_3_xf_index = in1.ReadShort();
            field_4_sst_index = in1.ReadInt();
        }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:12,代码来源:LabelSSTRecord.cs

示例7: UnknownRecord

        /**
         * construct an Unknown record.  No fields are interperated and the record will
         * be Serialized in its original form more or less
         * @param in the RecordInputstream to Read the record from
         */

        public UnknownRecord(RecordInputStream in1)
        {
            _sid = in1.Sid;
            _rawData = in1.ReadRemainder();

            //Console.WriteLine("UnknownRecord: 0x"+StringUtil.ToHexString(sid));
        }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:13,代码来源:UnknownRecord.cs

示例8: ViewDefinitionRecord

        public ViewDefinitionRecord(RecordInputStream in1)
        {
            rwFirst = in1.ReadUShort();
            rwLast = in1.ReadUShort();
            colFirst = in1.ReadUShort();
            colLast = in1.ReadUShort();
            rwFirstHead = in1.ReadUShort();
            rwFirstData = in1.ReadUShort();
            colFirstData = in1.ReadUShort();
            iCache = in1.ReadUShort();
            reserved = in1.ReadUShort();
            sxaxis4Data = in1.ReadUShort();
            ipos4Data = in1.ReadUShort();
            cDim = in1.ReadUShort();
            cDimRw = in1.ReadUShort();
            cDimCol = in1.ReadUShort();
            cDimPg = in1.ReadUShort();
            cDimData = in1.ReadUShort();
            cRw = in1.ReadUShort();
            cCol = in1.ReadUShort();
            grbit = in1.ReadUShort();
            itblAutoFmt = in1.ReadUShort();
            int cchName = in1.ReadUShort();
            int cchData = in1.ReadUShort();

            name = StringUtil.ReadUnicodeString(in1, cchName);
            dataField = StringUtil.ReadUnicodeString(in1, cchData);
        }
开发者ID:hanwangkun,项目名称:npoi,代码行数:28,代码来源:ViewDefinitionRecord.cs

示例9: ObjRecord

        /**
         * Constructs a OBJ record and Sets its fields appropriately.
         *
         * @param in the RecordInputstream to Read the record from
         */

        public ObjRecord(RecordInputStream in1)
        {
            subrecords = new ArrayList();
            //Check if this can be continued, if so then the
            //following wont work properly
            int subSize = 0;
            byte[] subRecordData = in1.ReadRemainder();

            RecordInputStream subRecStream = new RecordInputStream(new MemoryStream(subRecordData));
            while (subRecStream.HasNextRecord)
            {
                subRecStream.NextRecord();
                Record subRecord = SubRecord.CreateSubRecord(subRecStream);
                subSize += subRecord.RecordSize;
                subrecords.Add(subRecord);
            }

            /**
             * Add the EndSubRecord explicitly.
             * 
             * TODO - the reason the EndSubRecord Is always skipped Is because its 'sid' Is zero and
             * that causes subRecStream.HasNextRecord() to return false.
             * There may be more than the size of EndSubRecord left-over, if there Is any pAdding 
             * after that record.  The content of the EndSubRecord and the pAdding Is all zeros.
             * So there's not much to look at past the last substantial record.
             * 
             * See Bugs 41242/45133 for details.
             */
            if (subRecordData.Length - subSize >= 4)
            {
                subrecords.Add(new EndSubRecord());
            }
        }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:39,代码来源:ObjRecord.cs

示例10: ObjectLinkRecord

        /**
         * Constructs a ObjectLink record and Sets its fields appropriately.
         *
         * @param in the RecordInputstream to Read the record from
         */

        public ObjectLinkRecord(RecordInputStream in1)
        {

            field_1_anchorId = in1.ReadShort();
            field_2_link1 = in1.ReadShort();
            field_3_link2 = in1.ReadShort();
        }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:13,代码来源:ObjectLinkRecord.cs

示例11: 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()));
            }
        }
开发者ID:Reinakumiko,项目名称:npoi,代码行数:34,代码来源:LabelRecord.cs

示例12: BarRecord

        /**
         * Constructs a Bar record and s its fields appropriately.
         *
         * @param in the RecordInputstream to Read the record from
         */

        public BarRecord(RecordInputStream in1)
        {

            field_1_barSpace = in1.ReadShort();
            field_2_categorySpace = in1.ReadShort();
            field_3_formatFlags = in1.ReadShort();
        }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:13,代码来源:BarRecord.cs

示例13: ReadTokens

        /**
         * Reads <tt>size</tt> bytes of the input stream, to Create an array of <tt>Ptg</tt>s.
         * Extra data (beyond <tt>size</tt>) may be Read if and <tt>ArrayPtg</tt>s are present.
         */
        public static Ptg[] ReadTokens(int size, RecordInputStream in1)
        {
		    ArrayList temp = new ArrayList(4 + size / 2);
		    int pos = 0;
		    ArrayList arrayPtgs = null;
		    while (pos < size) {
			    Ptg ptg = Ptg.CreatePtg( in1 );
			    if (ptg is ArrayPtg) {
				    if (arrayPtgs == null) {
					    arrayPtgs = new ArrayList(5);
				    }
				    arrayPtgs.Add(ptg);
				    pos += ArrayPtg.PLAIN_TOKEN_SIZE;
			    } else {
				    pos += ptg.Size;
			    }
			    temp.Add( ptg );
		    }
		    if(pos != size) {
			    throw new Exception("Ptg array size mismatch");
		    }
		    if (arrayPtgs != null) {
			    for (int i=0;i<arrayPtgs.Count;i++) {
				    ArrayPtg p = (ArrayPtg)arrayPtgs[i];
				    p.ReadTokenValues(in1);
			    }
		    }
		    return ToPtgArray(temp);
        }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:33,代码来源:Ptg.cs

示例14: RKRecord

    /**
     * Constructs a RK record and Sets its fields appropriately.
     * @param in the RecordInputstream to Read the record from
     */

    public RKRecord(RecordInputStream in1)
    {
        field_1_row = in1.ReadUShort();
        field_2_col = in1.ReadUShort();
        field_3_xf_index = in1.ReadShort();
        field_4_rk_number = in1.ReadInt();
    }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:12,代码来源:RKRecord.cs

示例15: MulBlankRecord

        /**
         * Constructs a MulBlank record and Sets its fields appropriately.
         *
         * @param in the RecordInputstream to Read the record from
         */

        public MulBlankRecord(RecordInputStream in1)
        {
            _row = in1.ReadUShort();
            _first_col = in1.ReadShort();
            _xfs = ParseXFs(in1);
            _last_col = in1.ReadShort();
        }
开发者ID:xoposhiy,项目名称:npoi,代码行数:13,代码来源:MulBlankRecord.cs


注:本文中的NPOI.HSSF.Record.RecordInputStream类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。