Package org.apache.poi.hssf.record

Examples of org.apache.poi.hssf.record.InterfaceHdrRecord


  }
  public void testCheckRecordOrder() {
    final SanityChecker c = new SanityChecker();
    List records = new ArrayList();
    records.add(new BOFRecord());
    records.add(new InterfaceHdrRecord());
    records.add(createBoundSheetRec());
    records.add(EOFRecord.instance);
    CheckRecord[] check = {
        new CheckRecord(BOFRecord.class, '1'),
        new CheckRecord(InterfaceHdrRecord.class, '0'),
        new CheckRecord(BoundSheetRecord.class, 'M'),
        new CheckRecord(NameRecord.class, '*'),
        new CheckRecord(EOFRecord.class, '1'),
    };
    // check pass
    c.checkRecordOrder(records, check);
    records.add(2, createBoundSheetRec());
    c.checkRecordOrder(records, check);
    records.remove(1);    // optional record missing
    c.checkRecordOrder(records, check);
    records.add(3, new NameRecord());
    records.add(3, new NameRecord()); // optional multiple record occurs more than one time
    c.checkRecordOrder(records, check);

    // check fail
    confirmBadRecordOrder(check, new Record[] {
        new BOFRecord(),
        createBoundSheetRec(),
        new InterfaceHdrRecord(),
        EOFRecord.instance,
    });

    confirmBadRecordOrder(check, new Record[] {
        new BOFRecord(),
        new InterfaceHdrRecord(),
        createBoundSheetRec(),
        new InterfaceHdrRecord(),
        EOFRecord.instance,
    });

    confirmBadRecordOrder(check, new Record[] {
        new BOFRecord(),
        createBoundSheetRec(),
        new NameRecord(),
        EOFRecord.instance,
        new NameRecord(),
    });

    confirmBadRecordOrder(check, new Record[] {
        new InterfaceHdrRecord(),
        createBoundSheetRec(),
        EOFRecord.instance,
    });

    confirmBadRecordOrder(check, new Record[] {
        new BOFRecord(),
        new InterfaceHdrRecord(),
        EOFRecord.instance,
    });

    confirmBadRecordOrder(check, new Record[] {
        new InterfaceHdrRecord(),
        createBoundSheetRec(),
        new BOFRecord(),
        EOFRecord.instance,
    });

    confirmBadRecordOrder(check, new Record[] {
        new BOFRecord(),
        createBoundSheetRec(),
        new InterfaceHdrRecord(),
        EOFRecord.instance,
    });
  }
View Full Code Here


        List<Record> records = new ArrayList<Record>( 30 );
        retval.records.setRecords(records);
        List<FormatRecord> formats = retval.formats;

        records.add(createBOF());
        records.add(new InterfaceHdrRecord(CODEPAGE));
        records.add(createMMS());
        records.add(InterfaceEndRecord.instance);
        records.add(createWriteAccess());
        records.add(createCodepage());
        records.add(createDSF());
View Full Code Here

        List<Record> records = new ArrayList<Record>( 30 );
        retval.records.setRecords(records);
        List<FormatRecord> formats = retval.formats;

        records.add(createBOF());
        records.add(new InterfaceHdrRecord(CODEPAGE));
        records.add(createMMS());
        records.add(InterfaceEndRecord.instance);
        records.add(createWriteAccess());
        records.add(createCodepage());
        records.add(createDSF());
View Full Code Here

        List<Record> records = new ArrayList<Record>( 30 );
        retval.records.setRecords(records);
        List<FormatRecord> formats = retval.formats;

        records.add(createBOF());
        records.add(new InterfaceHdrRecord(CODEPAGE));
        records.add(createMMS());
        records.add(InterfaceEndRecord.instance);
        records.add(createWriteAccess());
        records.add(createCodepage());
        records.add(createDSF());
View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.record.InterfaceHdrRecord

Copyright © 2018 www.massapicom. 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.