Webpage size with Java


 
Thread Tools Search this Thread
Top Forums Programming Webpage size with Java
# 1  
Old 08-31-2010
Webpage size with Java

Hi.. I need to know the size in bytes of a webpage!!
For example I have this link The UNIX and Linux Forums - Learn UNIX and Linux from Experts and then...
Code:
URL u = new URL("https://www.unix.com");

There is any Java Class that can help me??

P.s.
sorry for my english... Smilie
prompt
# 2  
Old 09-01-2010
check the Java documentation. eg: getContentLength() method
# 3  
Old 09-01-2010
This is the dimension of the html page! But if I have an image or a script, the dimension of the download if bigger!
prompt
# 4  
Old 09-01-2010
You mean you want to download the embedded content of the webpage? That becomes a lot harder because it doesn't just have to download the page, it has to understand it, and recursively download the things in it as well.
# 5  
Old 09-01-2010
Exactly... Must I do it manually? Or there is a Java Class?
prompt
# 6  
Old 09-01-2010
Quote:
Originally Posted by prompt
Exactly... Must I do it manually? Or there is a Java Class?
you will have to parse the page and do it yourself. Remember there are many HTTP requests when loading a web page. A referenced image is not part of the first request. You could find yourself in recursion hell so be careful.
# 7  
Old 09-02-2010
Ok... I understand... Thank you both....
prompt
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Webpage Display

Hi, I need to display the output of a script in web page. Can anyone suggest me how to do that? (5 Replies)
Discussion started by: Arasu
5 Replies

2. Shell Programming and Scripting

Use Webpage to Start Script

I apologize if this is in the incorrect section, I'm not quite sure which section it should go in. Anyways... I've got a script that I'd like to be able to start with a webpage, something that just has a button that says "Start this Bot", which will start the bot and put it in the background.... (4 Replies)
Discussion started by: JoeGazz84
4 Replies

3. Programming

How to read max stack size -Xss that is set/default for a java program?

I need to know what is the maximum stack size i.e. -Xss my java program is running with. Is there a way to find that out from inside my java program code and outside of it. What i am looking for is to read whatever the current set max limit -Xss (stack sie) is for a particular JVM(not... (3 Replies)
Discussion started by: mohtashims
3 Replies

4. Shell Programming and Scripting

Help with opening webpage with IP#

Hi, I would like to open a webpage from an IP# from a file. Lets say I findout an IP address from using grep grep John remotecomputers.txt result: 192.168.2.1 Then after that I would like to increment the IP# to 192.168.2.2 from 192.168.2.1 After that I woud like to launch mozilla or... (2 Replies)
Discussion started by: tthach830
2 Replies

5. UNIX for Dummies Questions & Answers

Access Webpage in UNIX

Dear All, I do not know anything from UNIX and its systems. I have a course on bioinformatics and they taught us a little about the UNIX. They also provided a userID and password for the web server which I can access using SSH. now, with A LOT OF EFFORT, I wrote a small index.html file, saved it... (1 Reply)
Discussion started by: dreamer0085
1 Replies

6. UNIX for Dummies Questions & Answers

Checking heap memory size for java app

Hi I have one Java application installed in my Solaris system. Is there a way to find out the heap memory allocated size/used size/free size for the particular Java process? If anyone knows the command, please let me know. Even I appreciate if I have any scripts to find out the same. ... (0 Replies)
Discussion started by: nthiruvenkatam
0 Replies

7. Shell Programming and Scripting

cat a file on webpage

Hi, Is there a way to cat a file on Webpage? . Thanks in advance (3 Replies)
Discussion started by: rider29
3 Replies

8. Linux

use of FTP in webpage

Please help me to start with this trek... What are the steps for me to implement at FTP functionality on my web page... we have a linux box as our proxy server... (0 Replies)
Discussion started by: shiny
0 Replies

9. IP Networking

Where is the Default Webpage

I have SCO OpenServer 5 connected to the Internet and I would like to change the webpage that appears when I try from another computer the address: http://192.1xx.xx.xx. If I try this, a page about SCO appears, but I don't know where can I find it. Thanks:cool: (1 Reply)
Discussion started by: SuPeRbYtE
1 Replies

10. UNIX for Dummies Questions & Answers

webpage

Hi I was wondering how do I make my own webpage??? :rolleyes::confused: (4 Replies)
Discussion started by: babysoft19
4 Replies
Login or Register to Ask a Question