//Offset into buffer, incremented by length of previous MP3Object
int offset = 0;
//Go through the ObjectList of the Frame reading the data into the
//correct datatype.
AbstractDataType object;
Iterator<AbstractDataType> iterator = objectList.listIterator();
while (iterator.hasNext()) {
//The read has extended further than the defined frame size
if (offset > (size - 1)) {
throw new InvalidTagException("Invalid size for Frame Body");
}
//Get next Object and load it with data from the Buffer
object = iterator.next();
object.readByteArray(buffer, offset);
//Increment Offset to start of next datatype.
offset += object.getSize();
}
}