/** * Initialize a description by pack name and repository. * * <p>The corresponding index file is assumed to exist. If this is not true implementors must * extend the class and override {@link #getFileName(PackExt)}. * * <p>Callers should also try to fill in other fields if they are reasonably free to access at the * time this instance is being initialized. * * @param name name of the pack file. Must end with ".pack". * @param repoDesc description of the repo containing the pack file. */ public DfsPackDescription(DfsRepositoryDescription repoDesc, String name) { this.repoDesc = repoDesc; int dot = name.lastIndexOf('.'); this.packName = (dot < 0) ? name : name.substring(0, dot); this.sizeMap = new HashMap<PackExt, Long>(PackExt.values().length * 2); }