}
}
private void readSyncInfo(IPath path, DataInputStream input, List readPartners) throws IOException, CoreException {
int size = input.readInt();
ObjectMap table = new ObjectMap(size);
for (int i = 0; i < size; i++) {
QualifiedName name = null;
byte type = input.readByte();
switch (type) {
case QNAME :
String qualifier = input.readUTF();
String local = input.readUTF();
name = new QualifiedName(qualifier, local);
readPartners.add(name);
break;
case INDEX :
name = (QualifiedName) readPartners.get(input.readInt());
break;
default :
//if we get here then the sync info file is corrupt
String msg = NLS.bind(Messages.resources_readSync, path == null ? "" : path.toString()); //$NON-NLS-1$
throw new ResourceException(IResourceStatus.FAILED_READ_METADATA, path, msg, null);
}
// read the bytes
int length = input.readInt();
byte[] bytes = new byte[length];
input.readFully(bytes);
// put them in the table
table.put(name, bytes);
}
// set the table on the resource info
ResourceInfo info = workspace.getResourceInfo(path, true, false);
if (info == null)
return;