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


C# RecordInputStream.ReadUnicodeLEString方法代碼示例

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


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

示例1: TableStylesRecord

        public TableStylesRecord(RecordInputStream in1)
        {
            rt = in1.ReadUShort();
            grbitFrt = in1.ReadUShort();
            in1.ReadFully(unused);
            cts = in1.ReadInt();
            int cchDefListStyle = in1.ReadUShort();
            int cchDefPivotStyle = in1.ReadUShort();

            rgchDefListStyle = in1.ReadUnicodeLEString(cchDefListStyle);
            rgchDefPivotStyle = in1.ReadUnicodeLEString(cchDefPivotStyle);
        }
開發者ID:xoposhiy,項目名稱:npoi,代碼行數:12,代碼來源:TableStylesRecord.cs

示例2: ExtendedPivotTableViewFieldsRecord

        public ExtendedPivotTableViewFieldsRecord(RecordInputStream in1)
        {

            grbit1 = in1.ReadInt();
            grbit2 = in1.ReadUByte();
            citmShow = in1.ReadUByte();
            isxdiSort = in1.ReadUShort();
            isxdiShow = in1.ReadUShort();
            // This record seems to have different valid encodings
		    switch (in1.Remaining) {
			    case 0:
				    // as per "Microsoft Excel Developer's Kit" book
				    // older version of SXVDEX - doesn't seem to have a sub-total name
				    reserved1 = 0;
				    reserved2 = 0;
				    subName = null;
				    return;
			    case 10:
				    // as per "MICROSOFT OFFICE EXCEL 97-2007 BINARY FILE FORMAT SPECIFICATION" pdf
				    break;
			    default:
				    throw new RecordFormatException("Unexpected remaining size (" + in1.Remaining + ")");
		    }
            int cchSubName = in1.ReadUShort();
            reserved1 = in1.ReadInt();
            reserved2 = in1.ReadInt();
            if (cchSubName != STRING_NOT_PRESENT_LEN)
            {
                subName = in1.ReadUnicodeLEString(cchSubName);
            }
        }
開發者ID:uwitec,項目名稱:web-mvc-logistics,代碼行數:31,代碼來源:ExtendedPivotTableViewFieldsRecord.cs

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

示例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);
        }
開發者ID:ChiangHanLung,項目名稱:PIC_VDS,代碼行數:14,代碼來源:SeriesTextRecord.cs

示例5: StringRecord

        /**
         * Constructs a String record and Sets its fields appropriately.
         *
         * @param in the RecordInputstream to Read the record from
         */
        public StringRecord(RecordInputStream in1)
        {
            int field_1_string_length = in1.ReadShort();
            _is16bitUnicode = in1.ReadByte() != 0x00;

            if (_is16bitUnicode)
            {
                _text = in1.ReadUnicodeLEString(field_1_string_length);
            }
            else
            {
                _text = in1.ReadCompressedUnicode(field_1_string_length);
            }
        }
開發者ID:ctddjyds,項目名稱:npoi,代碼行數:19,代碼來源:StringRecord.cs

示例6: StringPtg

        /** Create a StringPtg from a stream */
        public StringPtg(RecordInputStream in1)
        {
            field_1_Length = in1.ReadUByte();
            field_2_options = (byte)in1.ReadByte();
            if (fHighByte.IsSet(field_2_options))
            {
                field_3_string = in1.ReadUnicodeLEString(field_1_Length);
            }
            else
            {
                field_3_string = in1.ReadCompressedUnicode(field_1_Length);
            }

            // SetValue(new String(data, offset+3, data[offset+1] + 256*data[offset+2]));
        }
開發者ID:ChiangHanLung,項目名稱:PIC_VDS,代碼行數:16,代碼來源:StringPtg.cs

示例7: BoundSheetRecord

        /**
         * Constructs a BoundSheetRecord and Sets its fields appropriately
         *
         * @param in the RecordInputstream to Read the record from
         */
        public BoundSheetRecord(RecordInputStream in1)
        {
            field_1_position_of_BOF = in1.ReadInt();	// bof
            field_2_option_flags = in1.ReadShort();	// flags
            int field_3_sheetname_length = in1.ReadUByte();						// len(str)
            field_4_isMultibyteUnicode = (byte)in1.ReadByte();						// Unicode

            if (this.IsMultibyte)
            {
                field_5_sheetname = in1.ReadUnicodeLEString(field_3_sheetname_length);
            }
            else
            {
                field_5_sheetname = in1.ReadCompressedUnicode(field_3_sheetname_length);
            }
        }
開發者ID:babywzazy,項目名稱:Server,代碼行數:21,代碼來源:BoundSheetRecord.cs

示例8: FormatRecord

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

        public FormatRecord(RecordInputStream in1)
        {
            field_1_index_code = in1.ReadShort();
            int field_3_unicode_len = in1.ReadShort();
            field_3_hasMultibyte = (in1.ReadByte() & (byte)0x01) != 0;

            if (field_3_hasMultibyte)
            {
                // Unicode
                field_4_formatstring = in1.ReadUnicodeLEString(field_3_unicode_len);
            }
            else
            {
                // not Unicode
                field_4_formatstring = in1.ReadCompressedUnicode(field_3_unicode_len);
            }
        }
開發者ID:ctddjyds,項目名稱:npoi,代碼行數:22,代碼來源:FormatRecord.cs

示例9: ExternalNameRecord

        public ExternalNameRecord(RecordInputStream in1)
        {
            field_1_option_flag = in1.ReadShort();
            field_2_index = in1.ReadShort();
            field_3_not_used = in1.ReadShort();
            int nameLength = in1.ReadUByte();
            int multibyteFlag = in1.ReadUByte();
            if (multibyteFlag == 0)
            {
                field_4_name = in1.ReadCompressedUnicode(nameLength);
            }
            else
            {
                field_4_name = in1.ReadUnicodeLEString(nameLength);
            }            
            if (!HasFormula)
            {
                if (!IsStdDocumentNameIdentifier && !IsOLELink && IsAutomaticLink)
                {
                    // both need to be incremented
                    int nColumns = in1.ReadUByte() + 1;
                    int nRows = in1.ReadShort() + 1;

                    int totalCount = nRows * nColumns;
                    _ddeValues = ConstantValueParser.Parse(in1, totalCount);
                    _nColumns = nColumns;
                    _nRows = nRows;
                }

                if (in1.Remaining > 0)
                {
                    throw ReadFail("Some Unread data (is formula present?)");
                }
                field_5_name_definition = null;
                return;
            }
            int nBytesRemaining = in1.Available();
            if (in1.Remaining <= 0)
            {
                throw ReadFail("Ran out of record data trying to read formula.");
            }
            short formulaLen = in1.ReadShort();
            nBytesRemaining -= 2;
            field_5_name_definition = NPOI.SS.Formula.Formula.Read(formulaLen, in1, nBytesRemaining);
        }
開發者ID:uwitec,項目名稱:web-mvc-logistics,代碼行數:45,代碼來源:ExternalNameRecord.cs

示例10: FooterRecord

        /// <summary>
        /// Initializes a new instance of the <see cref="FooterRecord"/> class.
        /// </summary>
        /// <param name="in1">the RecordInputstream to Read the record from</param>
        public FooterRecord(RecordInputStream in1)
        {
            if (in1.Remaining > 0)
            {
                field_1_footer_len = (byte)in1.ReadByte();
                /** These two fields are a bit odd. They are not documented*/
                field_2_reserved = (byte)in1.ReadByte();
                field_3_unicode_flag = (byte)in1.ReadByte();						// Unicode

                if (IsMultibyte)
                {
                    field_4_footer = in1.ReadUnicodeLEString(LittleEndian.UByteToInt(field_1_footer_len));
                }
                else
                {
                    field_4_footer = in1.ReadCompressedUnicode(LittleEndian.UByteToInt(field_1_footer_len));
                }
            }
        }
開發者ID:uwitec,項目名稱:web-mvc-logistics,代碼行數:23,代碼來源:FooterRecord.cs

示例11: ViewFieldsRecord

        public ViewFieldsRecord(RecordInputStream in1)
        {
            sxaxis = in1.ReadShort();
            cSub = in1.ReadShort();
            grbitSub = in1.ReadShort();
            cItm = in1.ReadShort();

            int cchName = in1.ReadUShort();
            if (cchName != STRING_NOT_PRESENT_LEN)
            {
                int flag = in1.ReadByte();
                if ((flag & 0x01) != 0)
                {
                    _name = in1.ReadUnicodeLEString(cchName);
                }
                else
                {
                    _name = in1.ReadCompressedUnicode(cchName);
                }
            }
        }
開發者ID:89sos98,項目名稱:npoi,代碼行數:21,代碼來源:ViewFieldsRecord.cs

示例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 = "";
            }
        }
開發者ID:ChiangHanLung,項目名稱:PIC_VDS,代碼行數:29,代碼來源:LabelRecord.cs

示例13: HeaderFooterBase

        protected HeaderFooterBase(RecordInputStream in1)
        {
            if (in1.Remaining > 0)
            {
                int field_1_footer_len = in1.ReadShort();
                field_2_hasMultibyte = in1.ReadByte() != 0x00;

                if (field_2_hasMultibyte)
                {
                    field_3_text = in1.ReadUnicodeLEString(field_1_footer_len);
                }
                else
                {
                    field_3_text = in1.ReadCompressedUnicode(field_1_footer_len);
                }
            }
            else
            {
                // Note - this is unusual for BIFF records in general, but normal for header / footer records:
                // when the text is empty string, the whole record is empty (just the 4 byte BIFF header)
                field_3_text = "";
            }
        }
開發者ID:JnS-Software-LLC,項目名稱:npoi,代碼行數:23,代碼來源:HeaderFooterBase.cs

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

示例15: ReadRawString

 private static String ReadRawString(RecordInputStream in1, int textLength)
 {
     byte compressByte = (byte)in1.ReadByte();
     bool isCompressed = (compressByte & 0x01) == 0;
     if (isCompressed)
     {
         return in1.ReadCompressedUnicode(textLength);
     }
     return in1.ReadUnicodeLEString(textLength);
 }
開發者ID:kenlen,項目名稱:npoi,代碼行數:10,代碼來源:TextObjectRecord.cs


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