SSISO Community

시소당

파일 확장자 가져오는 메소드

private  static  String  getExtension(File  f)  {
        String  ext  =  "";
        String  s  =  f.getName();
        int  i  =  s.lastIndexOf('.');
        if  (i  >  0  &&  i  <  s.length()  -  1)  {
                ext  =  s.substring(i  +  1).toLowerCase();
        }
        return  ext;
}

3989 view

4.0 stars