Java tutorial
//package com.java2s; //License from project: Open Source License import android.support.annotation.NonNull; import android.text.TextUtils; public class Main { public static String getFileScheme(@NonNull final String filePath) { if (TextUtils.isEmpty(filePath)) return ""; return filePath.substring(filePath.lastIndexOf(".") + 1); } }