本文整理汇总了C#中LF.Utils.NPOI.HSSF.Record.RecordInputStream.NextRecord方法的典型用法代码示例。如果您正苦于以下问题:C# RecordInputStream.NextRecord方法的具体用法?C# RecordInputStream.NextRecord怎么用?C# RecordInputStream.NextRecord使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LF.Utils.NPOI.HSSF.Record.RecordInputStream
的用法示例。
在下文中一共展示了RecordInputStream.NextRecord方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ConvertToInputStream
private static RecordInputStream ConvertToInputStream(DrawingRecord r)
{
byte[] data = r.Serialize();
using (MemoryStream ms = new MemoryStream(data))
{
RecordInputStream rinp = new RecordInputStream(ms);
rinp.NextRecord();
return rinp;
}
}
示例2: ExtSSTRecord
/**
* Constructs a EOFRecord record and Sets its fields appropriately.
* @param in the RecordInputstream to Read the record from
*/
public ExtSSTRecord(RecordInputStream in1)
{
field_1_strings_per_bucket = in1.ReadShort();
int nInfos = in1.Remaining / InfoSubRecord.ENCODED_SIZE;
List<InfoSubRecord> lst = new List<InfoSubRecord>(nInfos);
while (in1.Available() > 0)
{
InfoSubRecord info = new InfoSubRecord(in1);
lst.Add(info);
if (in1.Available() == 0 && in1.HasNextRecord && in1.GetNextSid() == ContinueRecord.sid)
{
in1.NextRecord();
}
}
_sstInfos = lst.ToArray();
}
示例3: ProcessRecords
/**
* Create an array of records from an input stream
*
* @param in the InputStream from which the records will be
* obtained
*
* @exception RecordFormatException on error Processing the
* InputStream
*/
public void ProcessRecords(Stream in1)
{
Record last_record = null;
RecordInputStream recStream = new RecordInputStream(in1);
while (recStream.HasNextRecord) {
recStream.NextRecord();
Record[] recs = RecordFactory.CreateRecord(recStream); // handle MulRK records
if (recs.Length > 1) {
for (int k = 0; k < recs.Length; k++) {
if ( last_record != null ) {
if (!ProcessRecord(last_record)) {
return;
}
}
last_record = recs[ k ]; // do to keep the algorithm homogeneous...you can't
} // actually continue a number record anyhow.
} else {
Record record = recs[ 0 ];
if (record != null) {
if (last_record != null) {
if (!ProcessRecord(last_record)) {
return;
}
}
last_record = record;
}
}
}
if (last_record != null) {
ProcessRecord(last_record);
}
}
示例4: CloneViaReserialise
public Record CloneViaReserialise()
{
// Do it via a re-serialization
// It's a cheat, but it works...
byte[] b = Serialize();
using (MemoryStream ms = new MemoryStream(b))
{
RecordInputStream rinp = new RecordInputStream(ms);
rinp.NextRecord();
Record[] r = RecordFactory.CreateRecord(rinp);
if (r.Length != 1)
{
throw new InvalidOperationException("Re-serialised a record to clone it, but got " + r.Length + " records back!");
}
return r[0];
}
}