The Artima Developer Community
Sponsored Link

Java Answers Forum
readLine() can cause overflow ?!

1 reply on 1 page. Most recent reply: Aug 16, 2003 2:45 AM by David

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
aj3423 aj

Posts: 16
Nickname: aj3423
Registered: Aug, 2003

readLine() can cause overflow ?! Posted: Aug 15, 2003 9:39 PM
Reply to this message Reply
Advertisement
i think if a textfile is very large and without even one "/n" ,when we read this file using "readLine()" , the whole file will be read into buffer as a line, then it will cause an overflow ?(i think 40G hard drive is far larger than 256M memory)


David

Posts: 150
Nickname: archangel
Registered: Jul, 2003

Re: readLine() can cause overflow ?! Posted: Aug 16, 2003 2:45 AM
Reply to this message Reply
The worst you should get is an OutOfMemoryError - when you've actually used up all the memory allocated to the JVM (but you can allocated more).

Flat View: This topic has 1 reply on 1 page
Topic: help please! coding problem Previous Topic   Next Topic Topic: JSP - Bean - SQL

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use