int i, iSize = 0, nSize;
SampleSet sts = db.getSts();
// loop through all the Samples in this unit
for (i = start; i < end; i++) {
Sample sample = sts.getSample(i);
nSize = iSize + sample.getResidualSize();
if (Math.abs(index - (float) iSize) <
Math.abs(index - (float) nSize)) {
return sample;
}