/** * Peek ahead to the next record, without incrementing the file position * * @return the next record */ Record peek() { int tempPos = filePos; Record r = new Record(data, filePos, this); filePos = tempPos; return r; }
/** * Constructs this object from the raw data * * @param r the raw data */ protected RecordData(Record r) { record = r; code = r.getCode(); }
/** * Constructor * * @param t the raw bytes */ public ContinueRecord(Record t) { super(t); data = t.getData(); }
Type type = r.getType(); if (type == Type.UNKNOWN && r.getCode() == 0) if (r.getLength() == 0xa) r.setType(Type.DIMENSION); while (excelFile.peek().getType() == Type.CONTINUE) r.addContinueRecord(excelFile.next()); Assert.verify(!br.isWorksheet()); int startpos = excelFile.getPos() - r.getLength() - 4; while (r2.getCode() != Type.EOF.value)
nameTable = nt; data = getRecord().getData(); while (nextRecord.getType() != Type.STRING && count < 4) byte[] stringData = nextRecord.getData(); while (nextRecord.getType() == Type.CONTINUE) byte[] d = new byte[stringData.length + nextRecord.getLength() - 1]; System.arraycopy(stringData, 0, d, 0, stringData.length); System.arraycopy(nextRecord.getData(), 1, d, stringData.length, nextRecord.getLength() - 1); stringData = d; nextRecord = excelFile.peek();
int code = r.getCode(); cont = (r.getType() == Type.BOF); if (r.getType() == Type.BOF) if (r.getType() == Type.EOF) buf.append(recordNames.get(r.getType())); buf.append("]"); buf.append(" (0x"); standardData[0] = (byte) (code & 0xff); standardData[1] = (byte) ((code & 0xff00) >> 8); standardData[2] = (byte) (r.getLength() & 0xff); standardData[3] = (byte) ((r.getLength() & 0xff00) >> 8); byte[] recordData = r.getData(); byte[] data = new byte[standardData.length + recordData.length]; System.arraycopy(standardData, 0, data, 0, standardData.length);
totalRecordLength += continuations[i].getLength(); totalRecordLength += getRecord().getLength(); System.arraycopy(getRecord().getData(), 0, data, 0, getRecord().getLength()); pos += getRecord().getLength(); System.arraycopy(r.getData(), 0, data, pos, r.getLength()); continuationBreaks[i] = pos; pos += r.getLength();
if (r.getType() == Type.SST) while (nextrec.getType() == Type.CONTINUE) else if (r.getType() == Type.FILEPASS) else if (r.getType() == Type.NAME) else if (r.getType() == Type.FONT) else if (r.getType() == Type.PALETTE) else if (r.getType() == Type.NINETEENFOUR) else if (r.getType() == Type.FORMAT) else if (r.getType() == Type.XF) else if (r.getType() == Type.BOUNDSHEET) else if (r.getType() == Type.EXTERNSHEET) else if (r.getType() == Type.XCT) else if (r.getType() == Type.CODEPAGE) else if (r.getType() == Type.SUPBOOK) while (nextrec.getType() == Type.CONTINUE)
/** * Gets the position of the current record in the biff file * * @return the position */ public int getPos() { return file.getPos() - record.getLength() - 4; } }
if (r2.getType() == Type.MSODRAWING || r2.getType() == Type.CONTINUE) Assert.verify(r2.getType() == Type.TXO); TextObjectRecord txo = new TextObjectRecord(r2); comment.setTextObject(txo); Assert.verify(r2.getType() == Type.CONTINUE); ContinueRecord text = new ContinueRecord(r2); comment.setText(text); if (r2.getType() == Type.CONTINUE) Assert.verify(r2.getType() == Type.MSODRAWING || r2.getType() == Type.CONTINUE); if (r2.getType() == Type.MSODRAWING || r2.getType() == Type.CONTINUE) Assert.verify(r2.getType() == Type.TXO); TextObjectRecord txo = new TextObjectRecord(r2); checkBox.setTextObject(txo); Assert.verify(r2.getType() == Type.CONTINUE); ContinueRecord text = new ContinueRecord(r2); checkBox.setText(text); if (r2.getType() == Type.CONTINUE) Assert.verify(r2.getType() == Type.MSODRAWING || r2.getType() == Type.CONTINUE); if (r2.getType() == Type.MSODRAWING ||
Type type = r.getType(); if (type == Type.UNKNOWN && r.getCode() == 0) if (r.getLength() == 0xa) r.setType(Type.DIMENSION); while (excelFile.peek().getType() == Type.CONTINUE) r.addContinueRecord(excelFile.next()); Assert.verify(!br.isWorksheet()); int startpos = excelFile.getPos() - r.getLength() - 4; while (r2.getCode() != Type.EOF.value)
nameTable = nt; data = getRecord().getData(); while (nextRecord.getType() != Type.STRING && count < 4) byte[] stringData = nextRecord.getData(); while (nextRecord.getType() == Type.CONTINUE) byte[] d = new byte[stringData.length + nextRecord.getLength() - 1]; System.arraycopy(stringData, 0, d, 0, stringData.length); System.arraycopy(nextRecord.getData(), 1, d, stringData.length, nextRecord.getLength() - 1); stringData = d; nextRecord = excelFile.peek();
int code = r.getCode(); cont = (r.getType() == Type.BOF); if (r.getType() == Type.BOF) if (r.getType() == Type.EOF) buf.append(recordNames.get(r.getType())); buf.append("]"); buf.append(" (0x"); standardData[0] = (byte) (code & 0xff); standardData[1] = (byte) ((code & 0xff00) >> 8); standardData[2] = (byte) (r.getLength() & 0xff); standardData[3] = (byte) ((r.getLength() & 0xff00) >> 8); byte[] recordData = r.getData(); byte[] data = new byte[standardData.length + recordData.length]; System.arraycopy(standardData, 0, data, 0, standardData.length);
totalRecordLength += continuations[i].getLength(); totalRecordLength += getRecord().getLength(); System.arraycopy(getRecord().getData(), 0, data, 0, getRecord().getLength()); pos += getRecord().getLength(); System.arraycopy(r.getData(), 0, data, pos, r.getLength()); continuationBreaks[i] = pos; pos += r.getLength();
if (r.getType() == Type.SST) while (nextrec.getType() == Type.CONTINUE) else if (r.getType() == Type.FILEPASS) else if (r.getType() == Type.NAME) else if (r.getType() == Type.FONT) else if (r.getType() == Type.PALETTE) else if (r.getType() == Type.NINETEENFOUR) else if (r.getType() == Type.FORMAT) else if (r.getType() == Type.XF) else if (r.getType() == Type.BOUNDSHEET) else if (r.getType() == Type.EXTERNSHEET) else if (r.getType() == Type.XCT) else if (r.getType() == Type.CODEPAGE) else if (r.getType() == Type.SUPBOOK) while (nextrec.getType() == Type.CONTINUE)
/** * Gets the length of the data portion of this record * Used to adjust when reading sheets which contain just a chart * @return the length of the data portion of this record */ int getLength() { return getRecord().getLength(); }
if (r2.getType() == Type.MSODRAWING || r2.getType() == Type.CONTINUE) Assert.verify(r2.getType() == Type.TXO); TextObjectRecord txo = new TextObjectRecord(r2); comment.setTextObject(txo); Assert.verify(r2.getType() == Type.CONTINUE); ContinueRecord text = new ContinueRecord(r2); comment.setText(text); if (r2.getType() == Type.CONTINUE) Assert.verify(r2.getType() == Type.MSODRAWING || r2.getType() == Type.CONTINUE); if (r2.getType() == Type.MSODRAWING || r2.getType() == Type.CONTINUE) Assert.verify(r2.getType() == Type.TXO); TextObjectRecord txo = new TextObjectRecord(r2); checkBox.setTextObject(txo); Assert.verify(r2.getType() == Type.CONTINUE); ContinueRecord text = new ContinueRecord(r2); checkBox.setText(text); if (r2.getType() == Type.CONTINUE) Assert.verify(r2.getType() == Type.MSODRAWING || r2.getType() == Type.CONTINUE); if (r2.getType() == Type.MSODRAWING ||
/** * Constructor * * @param t the raw bytes */ public ContinueRecord(Record t) { super(t); data = t.getData(); }