class BasenameBuilder {

    static String build(Resource resource) throws IOException{
        Validate.notNull(resource, "resource can't be null!");

        //---------------------------------------------------------------

        URL url = resource.getURL();
        String fileName = url.getFile();

        String afterParseUrl = parseUrl(url, fileName);

        String baseName = parseBasename(afterParseUrl);
        LOGGER.debug("file:[{}],baseName is:[{}]", fileName, baseName);
        return baseName;
    }

    private  BasenameBuilder();

}