private Clusters loadClusters(String cluserInputFile) { Clusters clusters; FileInputStream adrFile = null; try { adrFile = new FileInputStream(cluserInputFile); JAXBContext ctx = JAXBContext.newInstance(Clusters.class); Unmarshaller um = ctx.createUnmarshaller(); clusters = (Clusters) um.unmarshal(adrFile); return clusters; } catch (FileNotFoundException | JAXBException e) { e.printStackTrace(); } finally { if (adrFile != null) { try { adrFile.close(); } catch (IOException ignore) { } } } return null; }