private long getStoreId(File storeFile) {
Pattern p = Pattern.compile(m_name + "-(\d+)");
Matcher m = p.matcher(storeFile.getName());
if (m.find()) {
return Long.parseLong(m.group(1));
}
throw new RuntimeException("Invalid store file name: " + storeFile.getName());
}
|