Results 1 to 8 of 8
Thread: EOF methode
- 10-01-2010, 05:13 PM #1
Member
- Join Date
- Aug 2010
- Location
- Leuven, Belgium
- Posts
- 79
- Rep Power
- 0
- 10-01-2010, 05:17 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,399
- Blog Entries
- 7
- Rep Power
- 17
- 10-01-2010, 10:53 PM #3
Member
- Join Date
- Aug 2010
- Location
- Leuven, Belgium
- Posts
- 79
- Rep Power
- 0
Hello,
No i did not, but perhaps there is a method with another name that does the job.
Or there is another way of checking.
Grz
- 10-02-2010, 01:28 AM #4
Senior Member
- Join Date
- Feb 2010
- Location
- Waterford, Ireland
- Posts
- 748
- Rep Power
- 4
Java Code:try{ while(true){ // code here } } catch(EOFException e){}
- 10-02-2010, 08:38 AM #5
Member
- Join Date
- Aug 2010
- Location
- Leuven, Belgium
- Posts
- 79
- Rep Power
- 0
Thanks for the reply
- 10-02-2010, 10:24 AM #6
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,399
- Blog Entries
- 7
- Rep Power
- 17
- 10-02-2010, 03:36 PM #7
Member
- Join Date
- Aug 2010
- Location
- Leuven, Belgium
- Posts
- 79
- Rep Power
- 0
Thanks jos,
I am still using my code that is working.
I am used to work with VB en RealStudio.Java Code:br.readLine() == null;
There is an EOF.
Therefore i was just wondering if there was a similar thing in Java.
Kind regards
Dimi
- 10-02-2010, 03:50 PM #8
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,399
- Blog Entries
- 7
- Rep Power
- 17
In Java there is no such thing as an 'end of file' character and nor is there physically one in a file. There is an end of file condition and it is shown to you by the return value of the method if it can do so. Methods that can't return such a 'sentinel' value have to throw en EndOfFileException. Just play the game by the rules and everything will be fine.
kind regards,
Jos
Similar Threads
-
using paint methode in another class
By imorio in forum New To JavaReplies: 8Last Post: 08-12-2010, 03:17 PM -
calling methode with array
By koddy in forum New To JavaReplies: 0Last Post: 06-30-2010, 01:53 PM -
Get "Frame"(?) as a methode
By Mattedatten in forum New To JavaReplies: 3Last Post: 11-10-2009, 12:31 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks