public static String getFileExtension(final File file) {
    final String filename = file.getAbsolutePath();
    final int pos = filename.lastIndexOf(".");
    if (pos < 1 || pos == filename.length() - 1) {
      return "";
    }
    return filename.substring(pos + 1);
  }
Returns the basename of the specified <code>File</code>.

@param file a <code>File</code> object to obtain the basename from
@return the basename of file
java/zylib/src/main/java/com/google/security/zynamics/zylib/io/FileUtils.java