public byte[] getData() {
if (data == null)
{
data = file.read(dataPos, length);
}
// copy in any data from the continue records
if (continueRecords != null)
{
int size = 0;
byte[][] contData = new byte[continueRecords.size()][];
for (int i = 0; i < continueRecords.size(); i++)
{
Record r = (Record) continueRecords.get(i);
contData[i] = r.getData();
byte[] d2 = contData[i];
size += d2.length;
}
byte[] d3 = new byte[data.length + size];
System.arraycopy(data, 0, d3, 0, data.length);
int pos = data.length;
for (int i = 0; i < contData.length; i++)
{
byte[] d2 = contData[i];
System.arraycopy(d2, 0, d3, pos, d2.length);
pos += d2.length;
}
data = d3;
}
return data;
}
Gets the data portion of the record |