case PaddedRandomAccessBucket.MAGIC:
return new PaddedRandomAccessBucket(dis, fg, persistentFileTracker, masterKey);
case RAFBucket.MAGIC:
return new RAFBucket(dis, fg, persistentFileTracker, masterKey);
case EncryptedRandomAccessBucket.MAGIC:
return new EncryptedRandomAccessBucket(dis, fg, persistentFileTracker, masterKey);
default:
throw new StorageFormatException("Unknown magic value for bucket "+magic);
}
}