Examples of RecordStream


Examples of org.apache.poi.hssf.model.RecordStream

      new RowRecord(0),
      new NumberRecord(),
      new UnknownRecord(0x5555, "dummydata".getBytes()),
      new ContinueRecord("moredummydata".getBytes()),
    };
    RecordStream rs = new RecordStream(Arrays.asList(inRecs), 0);
    RowRecordsAggregate rra;
    try {
      rra = new RowRecordsAggregate(rs, SharedValueManager.createEmpty());
    } catch (RuntimeException e) {
      if (e.getMessage().startsWith("Unexpected record type")) {
View Full Code Here

Examples of org.apache.poi.hssf.model.RecordStream

        int recOffset = workbook.getNumRecords();
        int sheetNum = 0;

        // convert all LabelRecord records to LabelSSTRecord
        convertLabelRecords(records, recOffset);
        RecordStream rs = new RecordStream(records, recOffset);
        while (rs.hasNext()) {
            InternalSheet sheet = InternalSheet.createSheet(rs);
            _sheets.add(new HSSFSheet(this, sheet));
        }

        for (int i = 0 ; i < workbook.getNumNames() ; ++i){
View Full Code Here

Examples of org.apache.poi.hssf.model.RecordStream

    assertNotNull( "Row contains a value", record );
    assertTrue( "First record is a FormulaRecordsAggregate", ( record instanceof FormulaRecordAggregate ) );
  }

  private void constructValueRecord(List<Record> records) {
    RowBlocksReader rbr = new RowBlocksReader(new RecordStream(records, 0));
    SharedValueManager sfrh = rbr.getSharedFormulaManager();
    RecordStream rs = rbr.getPlainRecordStream();
    while(rs.hasNext()) {
      Record rec = rs.getNext();
      valueRecord.construct((CellValueRecordInterface)rec, rs, sfrh);
    }
  }
View Full Code Here

Examples of org.apache.poi.hssf.model.RecordStream

        new HeaderFooterRecord(HexRead.readFromString("9C 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C4 60 00 00 00 00 00 00 00 00")),
        new UserSViewEnd(HexRead.readFromString("01, 00")),

        EOFRecord.instance,
    };
    RecordStream rs = new RecordStream(Arrays.asList(recs), 0);
    InternalSheet sheet;
    try {
      sheet = InternalSheet.createSheet(rs);
    } catch (RuntimeException e) {
      if (e.getMessage().equals("two Page Settings Blocks found in the same sheet")) {
View Full Code Here

Examples of org.apache.poi.hssf.model.RecordStream

        new DimensionsRecord(),
        new WindowTwoRecord(),
        new HeaderFooterRecord(HexRead.readFromString("9C 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C4 60 00 00 00 00 00 00 00 00")),
        EOFRecord.instance,
    };
    RecordStream rs = new RecordStream(Arrays.asList(recs), 0);
    InternalSheet sheet = InternalSheet.createSheet(rs);

    RecordCollector rv = new RecordCollector();
    sheet.visitContainedRecords(rv, 0);
    Record[] outRecs = rv.getRecords();
View Full Code Here

Examples of org.apache.poi.hssf.model.RecordStream

        new DimensionsRecord(),
        createBottomMargin(0.787F),
        new WindowTwoRecord(),
        EOFRecord.instance,
    };
    RecordStream rs = new RecordStream(Arrays.asList(recs), 0);

    InternalSheet sheet;
    try {
      sheet = InternalSheet.createSheet(rs);
    } catch (RuntimeException e) {
View Full Code Here

Examples of org.apache.poi.hssf.model.RecordStream

    // Hypothetical setup of PSB records which should cause POI to crash
    Record[] recs = {
        new HeaderRecord("&LSales Figures"),
        new HeaderRecord("&LInventory"),
    };
    RecordStream rs = new RecordStream(Arrays.asList(recs), 0);

    try {
      new PageSettingsBlock(rs);
      throw new AssertionFailedError("Identified bug 47199b - duplicate PSB records should not be allowed");
    } catch (RecordFormatException e) {
View Full Code Here

Examples of org.apache.poi.hssf.model.RecordStream

    // initialise PSB with some records, but not the header / footer
    Record[] recs = {
        new HCenterRecord(),
        new VCenterRecord(),
    };
    RecordStream rs = new RecordStream(Arrays.asList(recs), 0);
    PageSettingsBlock psb = new PageSettingsBlock(rs);

    // serialize the PSB to see what records come out
    RecordCollector rc = new RecordCollector();
    psb.visitContainedRecords(rc);
View Full Code Here

Examples of org.apache.poi.hssf.model.RecordStream

        new HCenterRecord(),
        new VCenterRecord(),
        plsA,
        plsB, contB1, contB2, // make sure continuing PLS is still OK
    };
    RecordStream rs = new RecordStream(Arrays.asList(recs), 0);
    PageSettingsBlock psb;
    try {
      psb = new PageSettingsBlock(rs);
    } catch (RecordFormatException e) {
      if ("Duplicate PageSettingsBlock record (sid=0x4d)".equals(e.getMessage())) {
View Full Code Here

Examples of org.apache.poi.hssf.model.RecordStream

                new HeaderFooterRecord(HexRead.readFromString("9C 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 34 33 00 00 00 00 00 00 00 00")),
                new HeaderFooterRecord(HexRead.readFromString("9C 08 00 00 00 00 00 00 00 00 00 00 53 CE BD CC DE 38 44 45 97 C1 5C 89 F9 37 32 1B 34 33 00 00 00 00 00 00 00 00")),

                EOFRecord.instance,
        };
        RecordStream rs = new RecordStream(Arrays.asList(recs), 0);
        InternalSheet sheet;
        try {
            sheet = InternalSheet.createSheet(rs);
        } catch (RuntimeException e) {
            if (e.getMessage().equals("Duplicate PageSettingsBlock record (sid=0x89c)")) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.