파일 확장자명 얻는 방법

파일 확장자명 얻는 방법

Apache Commons IO에 보시면 FilenameUtils라는 클래스가 제공됩니다. getExtension() 메서드를 쓰시면 확장자를 얻을 수 있습니다.

  destinationFileNameExtention = FilenameUtils.getExtension(origin).toLowerCase();