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


C# RecordInputStream.Read方法代碼示例

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


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

示例1: FtrHeader

        public FtrHeader(RecordInputStream in1)
        {
            recordType = in1.ReadShort();
            grbitFrt = in1.ReadShort();

            reserved = new byte[8];
            in1.Read(reserved, 0, 8);
        }
開發者ID:JnS-Software-LLC,項目名稱:npoi,代碼行數:8,代碼來源:FtrHeader.cs

示例2: OldSheetRecord

 public OldSheetRecord(RecordInputStream in1)
 {
     field_1_position_of_BOF = in1.ReadInt();
     field_2_visibility = in1.ReadUByte();
     field_3_type = in1.ReadUByte();
     int field_4_sheetname_length = in1.ReadUByte();
     field_5_sheetname = new byte[field_4_sheetname_length];
     in1.Read(field_5_sheetname, 0, field_4_sheetname_length);
 }
開發者ID:Reinakumiko,項目名稱:npoi,代碼行數:9,代碼來源:OldSheetRecord.cs

示例3: OldStringRecord

        /**
         * @param in the RecordInputstream to read the record from
         */
        public OldStringRecord(RecordInputStream in1)
        {
            sid = in1.Sid;

            if (in1.Sid == biff2_sid)
            {
                field_1_string_len = (short)in1.ReadUByte();
            }
            else
            {
                field_1_string_len = in1.ReadShort();
            }

            // Can only decode properly later when you know the codepage
            field_2_bytes = new byte[field_1_string_len];
            in1.Read(field_2_bytes, 0, field_1_string_len);
        }
開發者ID:Reinakumiko,項目名稱:npoi,代碼行數:20,代碼來源:OldStringRecord.cs

示例4: OldLabelRecord

        /**
         * @param in the RecordInputstream to read the record from
         */
        public OldLabelRecord(RecordInputStream in1)
            : base(in1, in1.Sid == biff2_sid)
        {
            if (IsBiff2)
            {
                field_4_string_len = (short)in1.ReadUByte();
            }
            else
            {
                field_4_string_len = in1.ReadShort();
            }

            // Can only decode properly later when you know the codepage
            field_5_bytes = new byte[field_4_string_len];
            in1.Read(field_5_bytes, 0, field_4_string_len);

            if (in1.Remaining > 0)
            {
                logger.Log(POILogger.INFO,
                        "LabelRecord data remains: " + in1.Remaining +
                        " : " + HexDump.ToHex(in1.ReadRemainder())
                        );
            }
        }
開發者ID:Reinakumiko,項目名稱:npoi,代碼行數:27,代碼來源:OldLabelRecord.cs

示例5: HyperlinkRecord

        /**
         * Read hyperlink from input stream
         *
         * @param in the stream to Read from
         */
        public HyperlinkRecord(RecordInputStream in1)
        {
            try
            {
                rwFirst = in1.ReadShort();
                rwLast = in1.ReadUShort();
                colFirst = in1.ReadShort();
                colLast = in1.ReadShort();

                // 16-byte GUID
                guid = new byte[16];
                in1.Read(guid, 0, guid.Length);

                label_opts = in1.ReadInt();
                link_opts = in1.ReadInt();

                if ((link_opts & HLINK_LABEL) != 0)
                {
                    int label_len = in1.ReadInt();
                    label = in1.ReadUnicodeLEString(label_len);
                }

                if ((link_opts & HLINK_URL) != 0)
                {
                    moniker = new byte[16];
                    in1.Read(moniker, 0, moniker.Length);

                    if (Arrays.Equals(URL_MONIKER, moniker))
                    {
                        int len = in1.ReadInt();

                        address = in1.ReadUnicodeLEString( (len - URL_TAIL.Length)/2);  //minus the length of tail

                        tail = in1.ReadRemainder();
                    }
                    else if (Arrays.Equals(FILE_MONIKER, moniker))
                    {
                        file_opts = in1.ReadShort();

                        int len = in1.ReadInt();

                        byte[] path_bytes = new byte[len];
                        in1.Read(path_bytes, 0, path_bytes.Length);

                        address = Encoding.UTF8.GetString(path_bytes);

                        tail = in1.ReadRemainder();
                    }
                }
                else if ((link_opts & HLINK_PLACE) != 0)
                {
                    int len = in1.ReadInt();
                    address = in1.ReadUnicodeLEString(len);
                }
            }
            catch (IOException)
            {
                throw;
            }

        }
開發者ID:ChiangHanLung,項目名稱:PIC_VDS,代碼行數:66,代碼來源:HyperlinkRecord.cs


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