class SafeFileChecker {

    public static void checkSafeFilePath(String path) throws IOException {
        checkNullParameter(path);
        try {
            File sanityCheckedFile = doSanityCheck(path);
            //do Path Traversal check
            doCanonicalPathCheck(sanityCheckedFile.getPath());//N.B : the getPath return a normalized pathname string
            doDirCheck(sanityCheckedFile.getParent());
            doFilenameCheck(sanityCheckedFile.getName());
        } catch (Exception ex) {
            throw new IOException(ex);
        }

    }

    private  SafeFileChecker();

}