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


C# RecordInputStream.ReadCompressedUnicode方法代码示例

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


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

示例1: 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:missxiaohuang,项目名称:Weekly,代码行数:19,代码来源:StringRecord.cs

示例2: 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:missxiaohuang,项目名称:Weekly,代码行数:22,代码来源:FormatRecord.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);
            }
            else
            {
                field_3_username_value = "";
            }
        }
开发者ID:missxiaohuang,项目名称:Weekly,代码行数:23,代码来源:FileSharingRecord.cs

示例4: 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:missxiaohuang,项目名称:Weekly,代码行数:21,代码来源:ViewFieldsRecord.cs

示例5: 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:missxiaohuang,项目名称:Weekly,代码行数:29,代码来源:LabelRecord.cs

示例6: 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:missxiaohuang,项目名称:Weekly,代码行数:23,代码来源:HeaderFooterBase.cs

示例7: 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:missxiaohuang,项目名称:Weekly,代码行数:10,代码来源:TextObjectRecord.cs

示例8: 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 = "";
            }
        }
开发者ID:missxiaohuang,项目名称:Weekly,代码行数:36,代码来源:FontRecord.cs


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