Package org.apache.poi.hssf.record

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


    System.arraycopy(ENCODED_CONSTANT_DATA, 0, fullData, ENCODED_PTG_DATA.length, ENCODED_CONSTANT_DATA.length);

    // Force encoded operand class for tArray
    fullData[0] = (byte) (ArrayPtg.sid + operandClass);
   
    RecordInputStream in = TestcaseRecordInputStream.createWithFakeSid(fullData);
   
    Ptg[] ptgs = Ptg.readTokens(ENCODED_PTG_DATA.length, in);
    assertEquals(1, ptgs.length);
    ArrayPtg aPtg = (ArrayPtg) ptgs[0];
    assertEquals(operandClass, aPtg.getPtgClass());
View Full Code Here


    }
    private static final byte[] tRefN_data = {
      0x2C, 33, 44, 55, 66,
    };
    public void testReadWrite_tRefN_bug45091() {
        RecordInputStream in = TestcaseRecordInputStream.createWithFakeSid(tRefN_data);
        Ptg[] ptgs = Ptg.readTokens(tRefN_data.length, in);
        byte[] outData = new byte[5];
        Ptg.serializePtgs(ptgs, outData, 0);
        if (outData[0] == 0x24) {
            throw new AssertionFailedError("Identified bug 45091");
View Full Code Here

    if (!Arrays.equals(data, SAMPLE_ENCODING)) {
      fail("Encoding differs");
    }
  }
  public void testDecode() {
    RecordInputStream in = TestcaseRecordInputStream.createWithFakeSid(SAMPLE_ENCODING);
   
    Object[] values = ConstantValueParser.parse(in, 4);
    for (int i = 0; i < values.length; i++) {
      if(!isEqual(SAMPLE_VALUES[i], values[i])) {
        fail("Decoded result differs");
View Full Code Here

    System.arraycopy(ENCODED_CONSTANT_DATA, 0, fullData, ENCODED_PTG_DATA.length, ENCODED_CONSTANT_DATA.length);

    // Force encoded operand class for tArray
    fullData[0] = (byte) (ArrayPtg.sid + operandClass);
   
    RecordInputStream in = new TestcaseRecordInputStream(ArrayPtg.sid, fullData);
   
    Ptg[] ptgs = Ptg.readTokens(ENCODED_PTG_DATA.length, in);
    assertEquals(1, ptgs.length);
    ArrayPtg aPtg = (ArrayPtg) ptgs[0];
    assertEquals(operandClass, aPtg.getPtgClass());
View Full Code Here

TOP

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

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.