* @throws IOException
* read errors.
*/
private ContentDescription parseData(RandomAccessFile raf)
throws IOException {
ContentDescription result = null;
long chunkStart = raf.getFilePointer();
GUID guid = Utils.readGUID(raf);
if (GUID.GUID_CONTENTDESCRIPTION.equals(guid)) {
BigInteger chunkLen = Utils.readBig64(raf);
result = new ContentDescription(chunkStart, chunkLen);
/*
* Now comes 16-Bit values representing the length of the Strings
* which follows.
*/
int[] stringSizes = getStringSizes(raf);
/*
* Now we know the String length of each occuring String.
*/
String[] strings = new String[stringSizes.length];
for (int i = 0; i < strings.length; i++) {
if (stringSizes[i] > 0)
strings[i] = readFixedSizeUTF16Str(raf, stringSizes[i]);
}
if (stringSizes[0] > 0)
result.setTitle(strings[0]);
if (stringSizes[1] > 0)
result.setAuthor(strings[1]);
if (stringSizes[2] > 0)
result.setCopyRight(strings[2]);
if (stringSizes[3] > 0)
result.setComment(strings[3]);
if (stringSizes[4] > 0)
result.setRating(strings[4]);
}
return result;
}