use of com.biglybt.pif.ddb.DistributedDatabaseException in project BiglyBT by BiglySoftware.
the class DDBaseHelpers method getKey.
protected static HashWrapper getKey(DistributedDatabaseTransferType transfer_type) throws DistributedDatabaseException {
Class<?> c = transfer_type.getClass();
String new_name = c.getName();
String old_name = xfer_migration.get(new_name);
if (old_name == null) {
Debug.out("Missing xfer name map entry for '" + new_name + "'");
old_name = new_name;
}
if (old_name == null) {
throw (new DistributedDatabaseException("name doesn't exist for '" + c.getName() + "'"));
}
return (new HashWrapper(new SHA1Simple().calculateHash(old_name.getBytes())));
}
Aggregations