throw new ObjectAlreadyInLowlevelStorageException(pid);
}
filePath = pathAlgorithm.get(pid);
if (filePath == null || filePath.equals("")) { //guard against algorithm implementation
throw new LowlevelStorageException(true,
"null path from algorithm for pid " + pid);
}
try {
file = new File(filePath);
} catch (Exception eFile) { //purposefully general catch-all
throw new LowlevelStorageException(true,
"couldn't make File for " + filePath, eFile);
}
fileSystem.write(file, content);
pathRegistry.put(pid, filePath);
return file.length();