package com.qxueyou.scc.base.util; import org.apache.commons.lang3.StringUtils; /** * Îļþ¹¤¾ßÀà * @author xiadehu * */ public final class QFileUtils { /** * ¸ù¾Ýºó׺ÃûµÃµ½ÎļþÀàÐÍ * @param fileName * @return */ public static String getFileFormat(String fileName){ if(StringUtils.isEmpty(fileName)) { return "DATA"; } int lastDotIdx = fileName.lastIndexOf('.'); return lastDotIdx<0?"DATA":fileName.substring(lastDotIdx+1).toUpperCase(); } }