"Andrew Budds" <abud@informate.be> wrote:
>"Bob" <ups2000@hotmail.com> wrote:
>>MAy be somebody knows where I can find examples how to read from FIle in


>I'd strongly advise you take a look at 'Beginning Java 2' by Ivor Horton,
>Pub.: Wrox 1999, ISBN: 1-861002-23-8. I found it a great book for learning
>Java, streets ahead of any 'learn it in 21 days' books. This covers first
>file output and streams, then stream input (from any source -files in particular).
>The style is good and the material is uncomplicated but clear.
>Once you've covered the basics you'll need a good reference that'll cover
>the interesting wrinkles (& wot you forgot!). For that I bought 'Java In
>a Nutshell' by David Flannagan, Pub.: O'Reilly, ISBN1-56592-487-8.
>But here's a snippet to get you started, reading in a series of numbers:
>String directory = "C:/temp";
>String fName = "junk.txt";
>//define a file:
>File myFile = new File(directory, fName);
>DataInputStream numsIn = new DataInputStream(
> new FileInputStream(myFile));
>int num = 0;
>boolean EOF = false;
>while (!EOF) {
> try {
> processNumbers(numsIn.readInt); //-or whatever...
> }
> catch (EOFException e) {
> EOF = true; // terminates your read loop.
> }

Its tru this book rocks I have it myself. Definietly worth the money.