@Test public void blockPdfContentType() { String contentType = "application/pdf;charset=UTF-8"; String[] types = contentType.split(";"); boolean belongsToBlackList = ContentTypeUtils.belongsToBlackList(types); assertEquals(true, belongsToBlackList); }
public static boolean belongsToBlackList(String... content) { if (ArrayUtils.isEmpty(content)) return false; return Arrays.stream(blackList).anyMatch(Arrays.asList(content)::contains); }
ContentTypeUtils { public static boolean belongsToBlackList(String... content) { if (ArrayUtils.isEmpty(content)) return false; return Arrays.stream(blackList).anyMatch(Arrays.asList(content)::contains); } }
ContentTypeUtils { public static boolean belongsToBlackList(String... content) { if (ArrayUtils.isEmpty(content)) return false; return Arrays.stream(blackList).anyMatch(Arrays.asList(content)::contains); } private  ContentTypeUtils(); }
ContentTypeUtils { public static boolean belongsToBlackList(String... content) { if (ArrayUtils.isEmpty(content)) return false; return Arrays.stream(blackList).anyMatch(Arrays.asList(content)::contains); } private  ContentTypeUtils(); static boolean belongsToBlackList(String... content); }
ContentTypeUtils { public static boolean belongsToBlackList(String... content) { if (ArrayUtils.isEmpty(content)) return false; return Arrays.stream(blackList).anyMatch(Arrays.asList(content)::contains); } private  ContentTypeUtils(); static boolean belongsToBlackList(String... content);  }