public static long parseCommitCounterFile(final String name,final String ext) throws NumberFormatException {
  if (name == null)   throw new IllegalArgumentException();
  if (ext == null)   throw new IllegalArgumentException();
  final int len=name.length() - ext.length();
  final String fileBaseName=name.substring(0,len);
  final long commitCounter=Long.parseLong(fileBaseName);
  return commitCounter;
}

public static long parseCommitCounterFile ( final String name , final String ext ) throws NumberFormatException { if ( name == null ) throw new IllegalArgumentException ( ) ; if ( ext == null ) throw new IllegalArgumentException ( ) ; final int len = name . length ( ) - ext . length ( ) ; final String fileBaseName = name . substring ( 0 , len ) ; final long commitCounter = Long . parseLong ( fileBaseName ) ; return commitCounter ; }
parse out the commitcounter from the file name .
