Examples of IndexRecord


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

   */
  private static int getDbCellRecordPos(InternalSheet sheet) {

    MyIndexRecordListener myIndexListener = new MyIndexRecordListener();
    sheet.visitContainedRecords(myIndexListener, 0);
    IndexRecord indexRecord = myIndexListener.getIndexRecord();
    int dbCellRecordPos = indexRecord.getDbcellAt(0);
    return dbCellRecordPos;
  }
View Full Code Here

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

  public CellValueRecordInterface[] getValueRecords() {
    return _valuesAgg.getValueRecords();
  }

  public IndexRecord createIndexRecord(int indexRecordOffset, int sizeOfInitialSheetRecords) {
    IndexRecord result = new IndexRecord();
    result.setFirstRow(_firstrow);
    result.setLastRowAdd1(_lastrow + 1);
    // Calculate the size of the records from the end of the BOF
    // and up to the RowRecordsAggregate...

    // Add the references to the DBCells in the IndexRecord (one for each block)
    // Note: The offsets are relative to the Workbook BOF. Assume that this is
    // 0 for now.....

    int blockCount = getRowBlockCount();
    // Calculate the size of this IndexRecord
    int indexRecSize = IndexRecord.getRecordSizeForBlockCount(blockCount);

    int currentOffset = indexRecordOffset + indexRecSize + sizeOfInitialSheetRecords;

    for (int block = 0; block < blockCount; block++) {
      // each row-block has a DBCELL record.
      // The offset of each DBCELL record needs to be updated in the INDEX record

      // account for row records in this row-block
      currentOffset += getRowBlockSize(block);
      // account for cell value records after those
      currentOffset += _valuesAgg.getRowCellBlockSize(
          getStartRowNumberForBlock(block), getEndRowNumberForBlock(block));

      // currentOffset is now the location of the DBCELL record for this row-block
      result.addDbcell(currentOffset);
      // Add space required to write the DBCELL record (whose reference was just added).
      currentOffset += (8 + (getRowCountForBlock(block) * 2));
    }
    return result;
  }
View Full Code Here

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

   */
  private static int getDbCellRecordPos(InternalSheet sheet) {

    MyIndexRecordListener myIndexListener = new MyIndexRecordListener();
    sheet.visitContainedRecords(myIndexListener, 0);
    IndexRecord indexRecord = myIndexListener.getIndexRecord();
    int dbCellRecordPos = indexRecord.getDbcellAt(0);
    return dbCellRecordPos;
  }
View Full Code Here

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

  public CellValueRecordInterface[] getValueRecords() {
    return _valuesAgg.getValueRecords();
  }

  public IndexRecord createIndexRecord(int indexRecordOffset, int sizeOfInitialSheetRecords) {
    IndexRecord result = new IndexRecord();
    result.setFirstRow(_firstrow);
    result.setLastRowAdd1(_lastrow + 1);
    // Calculate the size of the records from the end of the BOF
    // and up to the RowRecordsAggregate...

    // Add the references to the DBCells in the IndexRecord (one for each block)
    // Note: The offsets are relative to the Workbook BOF. Assume that this is
    // 0 for now.....

    int blockCount = getRowBlockCount();
    // Calculate the size of this IndexRecord
    int indexRecSize = IndexRecord.getRecordSizeForBlockCount(blockCount);

    int currentOffset = indexRecordOffset + indexRecSize + sizeOfInitialSheetRecords;

    for (int block = 0; block < blockCount; block++) {
      // each row-block has a DBCELL record.
      // The offset of each DBCELL record needs to be updated in the INDEX record

      // account for row records in this row-block
      currentOffset += getRowBlockSize(block);
      // account for cell value records after those
      currentOffset += _valuesAgg.getRowCellBlockSize(
          getStartRowNumberForBlock(block), getEndRowNumberForBlock(block));

      // currentOffset is now the location of the DBCELL record for this row-block
      result.addDbcell(currentOffset);
      // Add space required to write the DBCELL record (whose reference was just added).
      currentOffset += (8 + (getRowCountForBlock(block) * 2));
    }
    return result;
  }
View Full Code Here

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

    public CellValueRecordInterface[] getValueRecords() {
        return _valuesAgg.getValueRecords();
    }

    public IndexRecord createIndexRecord(int indexRecordOffset, int sizeOfInitialSheetRecords) {
        IndexRecord result = new IndexRecord();
        result.setFirstRow(_firstrow);
        result.setLastRowAdd1(_lastrow + 1);
        // Calculate the size of the records from the end of the BOF
        // and up to the RowRecordsAggregate...

        // Add the references to the DBCells in the IndexRecord (one for each block)
        // Note: The offsets are relative to the Workbook BOF. Assume that this is
        // 0 for now.....

        int blockCount = getRowBlockCount();
        // Calculate the size of this IndexRecord
        int indexRecSize = IndexRecord.getRecordSizeForBlockCount(blockCount);

        int currentOffset = indexRecordOffset + indexRecSize + sizeOfInitialSheetRecords;

        for (int block = 0; block < blockCount; block++) {
            // each row-block has a DBCELL record.
            // The offset of each DBCELL record needs to be updated in the INDEX record

            // account for row records in this row-block
            currentOffset += getRowBlockSize(block);
            // account for cell value records after those
            currentOffset += _valuesAgg.getRowCellBlockSize(
                    getStartRowNumberForBlock(block), getEndRowNumberForBlock(block));

            // currentOffset is now the location of the DBCELL record for this row-block
            result.addDbcell(currentOffset);
            // Add space required to write the DBCELL record (whose reference was just added).
            currentOffset += (8 + (getRowCountForBlock(block) * 2));
        }
        return result;
    }
View Full Code Here

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

     */
    private static int getDbCellRecordPos(Sheet sheet) {

        MyIndexRecordListener myIndexListener = new MyIndexRecordListener();
        sheet.visitContainedRecords(myIndexListener, 0);
        IndexRecord indexRecord = myIndexListener.getIndexRecord();
        int dbCellRecordPos = indexRecord.getDbcellAt(0);
        return dbCellRecordPos;
    }
View Full Code Here

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

    public CellValueRecordInterface[] getValueRecords() {
        return _valuesAgg.getValueRecords();
    }

    public IndexRecord createIndexRecord(int indexRecordOffset, int sizeOfInitialSheetRecords) {
        IndexRecord result = new IndexRecord();
        result.setFirstRow(_firstrow);
        result.setLastRowAdd1(_lastrow + 1);
        // Calculate the size of the records from the end of the BOF
        // and up to the RowRecordsAggregate...

        // Add the references to the DBCells in the IndexRecord (one for each block)
        // Note: The offsets are relative to the Workbook BOF. Assume that this is
        // 0 for now.....

        int blockCount = getRowBlockCount();
        // Calculate the size of this IndexRecord
        int indexRecSize = IndexRecord.getRecordSizeForBlockCount(blockCount);

        int currentOffset = indexRecordOffset + indexRecSize + sizeOfInitialSheetRecords;

        for (int block = 0; block < blockCount; block++) {
            // each row-block has a DBCELL record.
            // The offset of each DBCELL record needs to be updated in the INDEX record

            // account for row records in this row-block
            currentOffset += getRowBlockSize(block);
            // account for cell value records after those
            currentOffset += _valuesAgg.getRowCellBlockSize(
                    getStartRowNumberForBlock(block), getEndRowNumberForBlock(block));

            // currentOffset is now the location of the DBCELL record for this row-block
            result.addDbcell(currentOffset);
            // Add space required to write the DBCELL record (whose reference was just added).
            currentOffset += (8 + (getRowCountForBlock(block) * 2));
        }
        return result;
    }
View Full Code Here

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

    public CellValueRecordInterface[] getValueRecords() {
        return _valuesAgg.getValueRecords();
    }

    public IndexRecord createIndexRecord(int indexRecordOffset, int sizeOfInitialSheetRecords) {
        IndexRecord result = new IndexRecord();
        result.setFirstRow(_firstrow);
        result.setLastRowAdd1(_lastrow + 1);
        // Calculate the size of the records from the end of the BOF
        // and up to the RowRecordsAggregate...

        // Add the references to the DBCells in the IndexRecord (one for each block)
        // Note: The offsets are relative to the Workbook BOF. Assume that this is
        // 0 for now.....

        int blockCount = getRowBlockCount();
        // Calculate the size of this IndexRecord
        int indexRecSize = IndexRecord.getRecordSizeForBlockCount(blockCount);

        int currentOffset = indexRecordOffset + indexRecSize + sizeOfInitialSheetRecords;

        for (int block = 0; block < blockCount; block++) {
            // each row-block has a DBCELL record.
            // The offset of each DBCELL record needs to be updated in the INDEX record

            // account for row records in this row-block
            currentOffset += getRowBlockSize(block);
            // account for cell value records after those
            currentOffset += _valuesAgg.getRowCellBlockSize(
                    getStartRowNumberForBlock(block), getEndRowNumberForBlock(block));

            // currentOffset is now the location of the DBCELL record for this row-block
            result.addDbcell(currentOffset);
            // Add space required to write the DBCELL record (whose reference was just added).
            currentOffset += (8 + (getRowCountForBlock(block) * 2));
        }
        return result;
    }
View Full Code Here

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

     */
    private static int getDbCellRecordPos(Sheet sheet) {

        MyIndexRecordListener myIndexListener = new MyIndexRecordListener();
        sheet.visitContainedRecords(myIndexListener, 0);
        IndexRecord indexRecord = myIndexListener.getIndexRecord();
        int dbCellRecordPos = indexRecord.getDbcellAt(0);
        return dbCellRecordPos;
    }
View Full Code Here

Examples of org.jnode.fs.hfsplus.tree.IndexRecord

        byte[] data = ByteBufferUtils.toArray(nodeData);
        NodeDescriptor nd = new NodeDescriptor(nodeData.array(), 0);

        while (nd.isIndexNode()) {
            CatalogIndexNode node = new CatalogIndexNode(data, nodeSize);
            IndexRecord record = (IndexRecord) node.find(new CatalogKey(parentID));
            currentOffset = record.getIndex() * nodeSize;
            nodeData = ByteBuffer.allocate(nodeSize);
            catalogFile.read(fs, currentOffset, nodeData);
            nodeData.rewind();
            data = ByteBufferUtils.toArray(nodeData);
            nd = new NodeDescriptor(nodeData.array(), 0);
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.