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


C# RecordInputStream.ReadRemainder方法代码示例

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


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

示例1: WSBoolRecord

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

        public WSBoolRecord(RecordInputStream in1)
        {
            byte[] data = in1.ReadRemainder();
            field_1_wsbool =
                data[0];
            field_2_wsbool =
                data[1];
        }
开发者ID:Johnnyfly,项目名称:source20131023,代码行数:13,代码来源:WSBoolRecord.cs

示例2: FeatProtection

        public FeatProtection(RecordInputStream in1)
        {
            fSD = in1.ReadInt();
            passwordVerifier = in1.ReadInt();

            title = StringUtil.ReadUnicodeString(in1);

            securityDescriptor = in1.ReadRemainder();
        }
开发者ID:Johnnyfly,项目名称:source20131023,代码行数:9,代码来源:FeatProtection.cs

示例3: AbstractEscherHolderRecord

        /**
         * Constructs a Bar record and Sets its fields appropriately.
         *
         * @param in the RecordInputstream to Read the record from
         */
        public AbstractEscherHolderRecord(RecordInputStream in1)
        {
            escherRecords = new List<EscherRecord>();
            if (!DESERIALISE)
            {
                rawDataContainer.Concatenate(in1.ReadRemainder());
            }
            else
            {
                byte[] data = in1.ReadAllContinuedRemainder();
                ConvertToEscherRecords(0, data.Length, data);
            }

        }
开发者ID:Johnnyfly,项目名称:source20131023,代码行数:19,代码来源:AbstractEscherHolderRecord.cs

示例4: ContinueRecord

        /**
         * Main constructor -- kinda dummy because we don't validate or fill fields
         *
         * @param in the RecordInputstream to Read the record from
         */

        public ContinueRecord(RecordInputStream in1)
        {
            field_1_data = in1.ReadRemainder();
        }
开发者ID:Johnnyfly,项目名称:source20131023,代码行数:10,代码来源:ContinueRecord.cs

示例5: HeaderFooterRecord

 /**
  * construct a HeaderFooterRecord record.  No fields are interpreted and the record will
  * be Serialized in its original form more or less
  * @param in the RecordInputstream to read the record from
  */
 public HeaderFooterRecord(RecordInputStream in1)
 {
     _rawData = in1.ReadRemainder();
 }
开发者ID:Johnnyfly,项目名称:source20131023,代码行数:9,代码来源:HeaderFooterRecord.cs

示例6: FeatHdrRecord

        public FeatHdrRecord(RecordInputStream in1)
        {
            futureHeader = new FtrHeader(in1);

            isf_sharedFeatureType = in1.ReadShort();
            reserved = (byte)in1.ReadByte();
            cbHdrData = in1.ReadInt();
            // Don't process this just yet, need the BOFRecord
            rgbHdrData = in1.ReadRemainder();
        }
开发者ID:Johnnyfly,项目名称:source20131023,代码行数:10,代码来源:FeatHdrRecord.cs

示例7: ObjRecord

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

        public ObjRecord(RecordInputStream in1)
        {
            // TODO - problems with OBJ sub-records stream
            // MS spec says first sub-record is always CommonObjectDataSubRecord,
            // and last is
            // always EndSubRecord. OOO spec does not mention ObjRecord(0x005D).
            // Existing POI test data seems to violate that rule. Some test data
            // seems to contain
            // garbage, and a crash is only averted by stopping at what looks like
            // the 'EndSubRecord'

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

            if (LittleEndian.GetUShort(subRecordData, 0) != CommonObjectDataSubRecord.sid)
            {
                // seems to occur in just one junit on "OddStyleRecord.xls" (file created by CrystalReports)
                // Excel tolerates the funny ObjRecord, and replaces it with a corrected version
                // The exact logic/reasoning is not yet understood
                _uninterpretedData = subRecordData;
                subrecords = null;
                return;
            }
            //if (subRecordData.Length % 2 != 0)
            //{
            //    String msg = "Unexpected length of subRecordData : " + HexDump.ToHex(subRecordData);
            //    throw new RecordFormatException(msg);
            //}
            subrecords = new List<SubRecord>();
            using (MemoryStream bais = new MemoryStream(subRecordData))
            {
                LittleEndianInputStream subRecStream = new LittleEndianInputStream(bais);
                CommonObjectDataSubRecord cmo = (CommonObjectDataSubRecord)SubRecord.CreateSubRecord(subRecStream, 0);
                subrecords.Add(cmo);
                while (true)
                {
                    SubRecord subRecord = SubRecord.CreateSubRecord(subRecStream, cmo.ObjectType);
                    subrecords.Add(subRecord);
                    if (subRecord.IsTerminating)
                    {
                        break;
                    }
                }
                int nRemainingBytes = subRecStream.Available();
                if (nRemainingBytes > 0)
                {
                    // At present (Oct-2008), most unit test samples have (subRecordData.length % 2 == 0)
                    _isPaddedToQuadByteMultiple = subRecordData.Length % MAX_PAD_ALIGNMENT == 0;
                    if (nRemainingBytes >= (_isPaddedToQuadByteMultiple ? MAX_PAD_ALIGNMENT : NORMAL_PAD_ALIGNMENT))
                    {
                        if (!CanPaddingBeDiscarded(subRecordData, nRemainingBytes))
                        {
                            String msg = "Leftover " + nRemainingBytes
                                + " bytes in subrecord data " + HexDump.ToHex(subRecordData);
                            throw new RecordFormatException(msg);
                        }
                        _isPaddedToQuadByteMultiple = false;
                    }
                }
                else
                {
                    _isPaddedToQuadByteMultiple = false;
                }
                _uninterpretedData = null;
            }
        }
开发者ID:Johnnyfly,项目名称:source20131023,代码行数:74,代码来源:ObjRecord.cs

示例8: UserSViewEnd

 /**
  * construct an UserSViewEnd record.  No fields are interpreted and the record will
  * be Serialized in its original form more or less
  * @param in the RecordInputstream to read the record from
  */
 public UserSViewEnd(RecordInputStream in1)
 {
     _rawData = in1.ReadRemainder();
 }
开发者ID:Johnnyfly,项目名称:source20131023,代码行数:9,代码来源:UserSViewEnd.cs

示例9: DrawingRecord

 public DrawingRecord(RecordInputStream in1)
 {
     recordData = in1.ReadRemainder();
 }
开发者ID:Johnnyfly,项目名称:source20131023,代码行数:4,代码来源:DrawingRecord.cs

示例10: 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();

            //if (false && GetBiffName(_sid) == null)
            //{
            //    // unknown sids in the range 0x0004-0x0013 are probably 'sub-records' of ObjectRecord
            //    // those sids are in a different number space.
            //    // TODO - put unknown OBJ sub-records in a different class
            //    System.Console.WriteLine("Unknown record 0x" + _sid.ToString("X"));
            //}
        }
开发者ID:Johnnyfly,项目名称:source20131023,代码行数:19,代码来源:UnknownRecord.cs

示例11: FeatSmartTag

 public FeatSmartTag(RecordInputStream in1)
 {
     data = in1.ReadRemainder();
 }
开发者ID:Johnnyfly,项目名称:source20131023,代码行数:4,代码来源:FeatSmartTag.cs

示例12: HyperlinkRecord


//.........这里部分代码省略.........

            if ((_linkOpts & HLINK_LABEL) != 0)
            {
                int label_len = in1.ReadInt();
                _label = in1.ReadUnicodeLEString(label_len);
            }
            if ((_linkOpts & HLINK_TARGET_FRAME) != 0)
            {
                int len = in1.ReadInt();
                _targetFrame = in1.ReadUnicodeLEString(len);
            }
            if ((_linkOpts & HLINK_URL) != 0 && (_linkOpts & HLINK_UNC_PATH) != 0)
            {
                _moniker = null;
                int nChars = in1.ReadInt();
                _address = in1.ReadUnicodeLEString(nChars);
            }
            if ((_linkOpts & HLINK_URL) != 0 && (_linkOpts & HLINK_UNC_PATH) == 0)
            {
                _moniker = new GUID(in1);

                if (URL_MONIKER.Equals(_moniker))
                {
                    int length = in1.ReadInt();
                    /*
                     * The value of <code>length<code> be either the byte size of the url field
                     * (including the terminating NULL character) or the byte size of the url field plus 24.
                     * If the value of this field is set to the byte size of the url field,
                     * then the tail bytes fields are not present.
                     */
                    int remaining = in1.Remaining;
                    if (length == remaining)
                    {
                        int nChars = length / 2;
                        _address = in1.ReadUnicodeLEString(nChars);
                    }
                    else
                    {
                        int nChars = (length - TAIL_SIZE) / 2;
                        _address = in1.ReadUnicodeLEString(nChars);
                        /*
                         * TODO: make sense of the remaining bytes
                         * According to the spec they consist of:
                         * 1. 16-byte  GUID: This field MUST equal
                         *    {0xF4815879, 0x1D3B, 0x487F, 0xAF, 0x2C, 0x82, 0x5D, 0xC4, 0x85, 0x27, 0x63}
                         * 2. Serial version, this field MUST equal 0 if present.
                         * 3. URI Flags
                         */
                        _uninterpretedTail = ReadTail(URL_uninterpretedTail, in1);
                    }
                }
                else if (FILE_MONIKER.Equals(_moniker))
                {
                    _fileOpts = in1.ReadShort();

                    int len = in1.ReadInt();
                    _shortFilename = StringUtil.ReadCompressedUnicode(in1, len);
                    _uninterpretedTail = ReadTail(FILE_uninterpretedTail, in1);
                    int size = in1.ReadInt();
                    if (size > 0)
                    {
                        int charDataSize = in1.ReadInt();

                        //From the spec: An optional unsigned integer that MUST be 3 if present
                        int optFlags = in1.ReadUShort();
                        if (optFlags != 0x0003)
                        {
                            throw new RecordFormatException("Expected 0x3 but found " + optFlags);
                        }
                        _address = StringUtil.ReadUnicodeLE(in1, charDataSize / 2);
                    }
                    else
                    {
                        _address = null;
                    }
                }
                else if (STD_MONIKER.Equals(_moniker))
                {
                    _fileOpts = in1.ReadShort();

                    int len = in1.ReadInt();

                    byte[] path_bytes = new byte[len];
                    in1.ReadFully(path_bytes);

                    _address = Encoding.UTF8.GetString(path_bytes);
                }
            }

            if ((_linkOpts & HLINK_PLACE) != 0)
            {
                int len = in1.ReadInt();
                _textMark = in1.ReadUnicodeLEString(len);
            }

            if (in1.Remaining > 0)
            {
                Console.WriteLine(HexDump.ToHex(in1.ReadRemainder()));
            }
        }
开发者ID:Johnnyfly,项目名称:source20131023,代码行数:101,代码来源:HyperlinkRecord.cs


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