String encoding = fileControl.encoding;
if (encoding.equalsIgnoreCase("ISO-8859-1") ||
encoding.equalsIgnoreCase("UTF-8"))
return JobStatus.VALID;
HttpUtility http = new HttpUtility();
String charsetUri = urlBase + charsetsPath;
ObjectMapper mapper = new ObjectMapper();
try(CloseableHttpResponse response = http.get(new URI(charsetUri), ContentType.APPLICATION_JSON.getMimeType())) {
String[] charsets = mapper.readValue(response.getEntity().getContent(), String[].class);
boolean encodingFound = false;
for (String charset : charsets) {
if (encoding.equalsIgnoreCase(charset)) {
encodingFound = true;