I need to create method, which can download 2 newest .xml files (or just extract URL to these files) from this website: http://rss.nbp.pl/kursy/xml2/2015/a/. I know how to do it with speciefied URL, but I have no idea how to automatically download newest files.
Actually I've got this:
URL website = new URL(xmlFileUrl);
ReadableByteChannel rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream("src/com/sh00x/files/kursy2.xml");
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
Thanks for any help, Greetings