public final byte[] getBytes() {
byte[] data = getData();
int dataLength = data.length;
// Don't the call the automatic continuation code for now
// Assert.verify(dataLength < = maxRecordLength - 4);
// If the bytes length is greater than the max record length
// then split out the data set into continue records
if (data.length > maxRecordLength - 4)
{
dataLength = maxRecordLength - 4;
data = handleContinueRecords(data);
}
byte[] bytes = new byte[data.length + 4];
System.arraycopy(data, 0, bytes, 4, data.length);
IntegerHelper.getTwoBytes(getCode(), bytes, 0);
IntegerHelper.getTwoBytes(dataLength, bytes, 2);
return bytes;
}
Used when writing out records. This portion of the method handles the
biff code and the length of the record and appends on the data retrieved
from the subclasses |