Let say I have a URL: http://java.sun.com/j2se/1.5/pdf I want to get a list of all files/directories under the pdf directory.
I’m using Java 5.
I can get the list of dir with this program http://www.httrack.com/, but with Java I don’t know if it is possible.
Does any body know how to get it in Java? Or how can this program do the job if Java can’t?
There are some conditions:
The parsing can be done easily using a lib like JSoup.
For example, using JSoup you can fetch the documents at url
http://howto.unixdev.net/like this:Will output:
As for your sample url
http://java.sun.com/j2se/1.5/pdfthis is a page not found, so I think you’re out of luck.