class FilenameUtils {

  public static String stripExtension(final String filename) {
    if (null == filename) {
      return null;
    }
    final int index = filename.lastIndexOf(EXTENSION_SEPARATOR);
    return (index < 0) ? filename : filename.substring(0, index);
  }

}