Example usage for org.eclipse.jgit.internal.storage.pack PackExt newPackExt

List of usage examples for org.eclipse.jgit.internal.storage.pack PackExt newPackExt

Introduction

In this page you can find the example usage for org.eclipse.jgit.internal.storage.pack PackExt newPackExt.

Prototype

public synchronized static PackExt newPackExt(String ext) 

Source Link

Document

Returns a PackExt for the file extension and registers it in the values array.

Usage

From source file:com.benhumphreys.jgitcassandra.store.DescMapper.java

License:Apache License

/**
 * The PackExt class defines a number of static instances
 *///from  w  w w  .  ja  v  a  2 s.c o  m
private static PackExt lookupExt(String extStr) {
    for (PackExt ext : PackExt.values()) {
        if (ext.getExtension().equals(extStr)) {
            return ext;
        }
    }

    // If we get here, the extension does not exist so create it. It gets
    // added to the list of known extensions in PackExt, so next time the
    // lookup will be successful
    return PackExt.newPackExt(extStr);
}