public void saveStreams() throws IOException { Config config = Config.getConfiguration("manager.streams"); config.setArray("streams", streams.toArray()); Iterator it = streams.iterator(); while (it.hasNext()) { DataSource ds = (DataSource) it.next(); ds.save(); } config.save(); }