AboutArtemus Harper Expertise I have experence in Core Java, good background in Java swing/gui, some experence with JNI, Java reflection, and Java java.nio.*
knowledge of Java bytecode and retrofitting non-open source code to paticular needs.
Basics in c++
Experience Currently working full time to produce applications to help with OWL ontologies
I do not have experence with J2ME,or database applications. I do not have experence with IDEs except for Eclipse.
Expert: Artemus Harper Date: 6/5/2008 Subject: progress bar
Question i am working on a project called web spider where i am displaying all the hyperlinks of a web page.this displaying of links take some time, so i want to put a progress bar.but i don't know how to make it work accordingly. similarly while downloading the web pages, some time is taken..and for this also i want to put a progress bar..i know how to create a progress bar, but how to make it work according to my project is what i am not getting..can you please send me the code for it.do you want me to send you my project??
Answer When you have a URL, you can use getConnection to get a URLConnection. From there you can call getContentLength() to get how big the web page is. This value may not always be given by the server, and in that case -1 is returned. You can call getInputStream on the URLConnection to start the download.
For web crawling it is not possible to get an overall estimate, since links may go to other links and it is not possible to know how deep or how big a page is until you visit it.