class FilenameVariantConverter {

    public String getVariantFromFilename(String fileName) {
        if (fileName == null) {
            return "";
        }
        int index = fileName.indexOf(variantIdentifier);
        if (index == -1) {
            return "";
        }
        String subString = fileName.substring(index + variantIdentifier.length());
        index = subString.indexOf('.');
        if (index == -1) {
            return "";
        }
        return subString.substring(0, index);
    }

    public  FilenameVariantConverter();
    public  FilenameVariantConverter(String varIdentifier);

}