This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes Reading a HTML file by a buffered reader Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Reading a HTML file by a buffered reader" Watch "Reading a HTML file by a buffered reader" New topic
Author

Reading a HTML file by a buffered reader

Florin Florentin
Ranch Hand

Joined: May 12, 2009
Posts: 43
Hello. I'm trying to read a HTML file in a BufferedReader, but when i'm printing the content that i read, i'm getting some different lines that are not in the web browser when i click view source on the page. Also some lines are missing. Does anyone know what's about?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19654
    
  18

How are you reading the HTML file? Is it a static HTML page or perhaps a JSP, PHP or ASP page?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

Many applications and libraries use the User Agent as identified in a request to customize the content returned for a particular browser. Depending on exactly what's different between your browser and application, that may explain what you are seeing.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Florin Florentin
Ranch Hand

Joined: May 12, 2009
Posts: 43
Thank you. The problem where that i was trying to read a page that needed login
 
Consider Paul's rocket mass heater.
 
subject: Reading a HTML file by a buffered reader
 
Similar Threads
User Name Validation
A problem with reading files
FileOutputStream w/ Cipher adds extra lines unnecessarily
Linefeed problem while scanning a line
Reading contents of PDF in JAVA