/** * Constructs this object from the raw data * * @param t the raw data * @param biff7 a dummy value to tell the record to interpret the * data as biff7 */ public BoundsheetRecord(Record t, Biff7 biff7) { super(t); byte[] data = getRecord().getData(); offset = IntegerHelper.getInt(data[0], data[1], data[2], data[3]); typeFlag = data[5]; visibilityFlag = data[4]; length = data[6]; byte[] bytes = new byte[length]; System.arraycopy(data, 7, bytes, 0, length); name = new String(bytes); }
/** * Constructs this object from the raw data * * @param t the raw data * @param biff7 a dummy value to tell the record to interpret the * data as biff7 */ public BoundsheetRecord(Record t, Biff7 biff7) { super(t); byte[] data = getRecord().getData(); offset = IntegerHelper.getInt(data[0], data[1], data[2], data[3]); typeFlag = data[5]; visibilityFlag = data[4]; length = data[6]; byte[] bytes = new byte[length]; System.arraycopy(data, 7, bytes, 0, length); name = new String(bytes); }
/** * Constructs this object from the raw data * * @param t the raw data * @param s the workbook settings */ public BoundsheetRecord(Record t, WorkbookSettings s) { super(t); byte[] data = getRecord().getData(); offset = IntegerHelper.getInt(data[0], data[1], data[2], data[3]); typeFlag = data[5]; visibilityFlag = data[4]; length = data[6]; if (data[7] == 0) { // Standard ASCII encoding byte[] bytes = new byte[length]; System.arraycopy(data, 8, bytes, 0, length); name = StringHelper.getString(bytes, length, 0, s); } else { // little endian Unicode encoding byte[] bytes = new byte[length * 2]; System.arraycopy(data, 8, bytes, 0, length * 2); name = StringHelper.getUnicodeString(bytes, length, 0); } }
/** * Constructs this object from the raw data * * @param t the raw data * @param s the workbook settings */ public BoundsheetRecord(Record t, WorkbookSettings s) { super(t); byte[] data = getRecord().getData(); offset = IntegerHelper.getInt(data[0], data[1], data[2], data[3]); typeFlag = data[5]; visibilityFlag = data[4]; length = data[6]; if (data[7] == 0) { // Standard ASCII encoding byte[] bytes = new byte[length]; System.arraycopy(data, 8, bytes, 0, length); name = StringHelper.getString(bytes, length, 0, s); } else { // little endian Unicode encoding byte[] bytes = new byte[length * 2]; System.arraycopy(data, 8, bytes, 0, length * 2); name = StringHelper.getUnicodeString(bytes, length, 0); } }