This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes GUI PhoneBook  Reading from disk Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "GUI PhoneBook  Reading from disk" Watch "GUI PhoneBook  Reading from disk" New topic
Author

GUI PhoneBook Reading from disk

Royce Warren
Greenhorn

Joined: Jun 05, 2009
Posts: 1
I have part of my source files to display. This file actually writes to the file to be stored on the disk. I would like to know how to write the method for reading from the disk. Then I would like to know the method to display the information to the console. Any suggestions would be appreciated. Thanks



I am a beginning Java Coder and I am very proud of that fact.
Peace and blessings,
UrbanJava.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37953
    
  22
Welcome to JavaRanch

You will realise we don't simply give out answers to that sort of exercise.

That looks a complicated bit of code, which ought to be in its own methods, not all in the main method. What sort of format are you writing these files in? Is it text or binary? Have you come across classes which buffer outputs and inputs? Or the newer classes, Scanner and Formatter? Have you looked at the Java™ Tutorials where you should find something useful?
 
jQuery in Action, 2nd edition
 
subject: GUI PhoneBook Reading from disk
 
Similar Threads
File IO - BufferedWriter/FileWriter
my file appending utility
1 Character seems to be written as one byte
K*B 1.5 book . PG 433 Error
close() for I/O objects