class PosterUtils {

    public static File getMoviePosterFileWithName(File rootPath, String movieName) {
        movieName = movieName.replaceAll("\\\\", "-");
        movieName = movieName.replaceAll(" ", "-");
        return new File(rootPath, String.format("%s.jpg", movieName));
    }

}

class PosterUtilsTest {

    @Test
    public void getMoviePosterFileWithName() throws Exception {

        Assert.assertEquals("C:\\这个--杀手-不-太冷.jgp",
                PosterUtils.getMoviePosterFileWithName(
                        new File("C:\\"),
                        "这个 \\杀手 不\\太冷").getPath());
    }

}