String (@Nullable String path) { if (path == null || path.isEmpty()) { return null; } int end = lastNonSeparatorIndex(path); if (end == -1) { return null; } int start = lastSeparatorIndex(path, end) + 1; int index = StringUtilRt.lastIndexOf(path, '.', Math.max(start, 0), end + 1); return index < 0 ? null : path.substring(index + 1, end + 1); }