Example usage for org.apache.poi.hssf.record UnknownRecord getBiffName

List of usage examples for org.apache.poi.hssf.record UnknownRecord getBiffName

Introduction

In this page you can find the example usage for org.apache.poi.hssf.record UnknownRecord getBiffName.

Prototype

public static String getBiffName(int sid) 

Source Link

Document

These BIFF record types are known but still uninterpreted by POI

Usage

From source file:com.pnf.plugin.ole.parser.xls.BiffRecord.java

License:Apache License

public BiffRecord(byte[] data, int offset, int recNum, int sid, int size) {
    this.offset = offset;
    this.recNum = recNum;
    this.sid = sid;
    this.size = size;
    this.data = data;

    Class<? extends Record> clazz = getClass(sid);

    if (clazz == UnknownRecord.class) {
        name = UnknownRecord.getBiffName(sid);

        if (name == null)
            name = UNKNOWN_SID;//from  www.  j a  v a  2 s  .c  o m
    } else {
        name = clazz.getName();
    }

    name = name.substring(name.lastIndexOf('.') + 1);

    firstLabel = getName();

    String[] tempLabels = { String.valueOf(getOffset()), String.valueOf(getSid()),
            String.valueOf(getRecordNumber()), String.valueOf(getDataSize()),
            dataString == null ? "" : dataString };

    labels = tempLabels;
}