while ((line = reader.readLine()) != null) {
if (line.length() != 0) {
int colonPos = line.indexOf(':');
ArcFileHeaderItem item = new ArcFileHeaderItem();
if (colonPos != -1 && colonPos != line.length() - 1) {
item.setItemKey(line.substring(0, colonPos));
item.setItemValue(line.substring(colonPos + 1));
// if this is our special truncation flag ...
if (item.getItemKey().equals(
Constants.ARCFileHeader_ContentTruncated)) {
String parts[] = item.getItemValue().split(",");
for (String part : parts) {
if (part.equals(ArcFileItem.Flags
.toString(ArcFileItem.Flags.TruncatedInInflate))) {
_item.setFlags(_item.getFlags()
| ArcFileItem.Flags.TruncatedInDownload);
} else if (part.equals(ArcFileItem.Flags
.toString(ArcFileItem.Flags.TruncatedInInflate))) {
_item.setFlags(_item.getFlags()
| ArcFileItem.Flags.TruncatedInInflate);
}
}
}
} else {
item.setItemValue(line);
}
_item.getHeaderItems().add(item);
}
}
}