Search:

Type: Posts; User: Norm

Search: Search took 0.21 seconds.

  1. Replies
    20
    Views
    4,544

    Re: What is the best way to read from a text file?

    Makes sense to do it what you find to be the easiest way.
  2. Replies
    20
    Views
    4,544

    Re: What is the best way to read from a text file?

    I'm sure there are many different ways to scan through the characters coming from a file.
    readLine gives you a String and skips over the end of line characters.
    read() would give you a single...
  3. Replies
    20
    Views
    4,544

    Re: What is the best way to read from a text file?

    I don't know how you get at the data in the BufferedReader's buffer without calling a read method which removes the data from the buffer. One of the constructors allows you to specify the size of...
  4. Replies
    20
    Views
    4,544

    Re: What is the best way to read from a text file?

    You can do some buffering yourself. Just like the getToken method will move thru a String that you have read token by token, you can call the BufferedReader methods to get the next line when the...
  5. Replies
    20
    Views
    4,544

    Re: What is the best way to read from a text file?

    That sounds like a reasonable approach.
    The String class has methods for looking at the contents of a String and for extracting parts of the String.
  6. Replies
    20
    Views
    4,544

    Re: What is the best way to read from a text file?

    Do you mean you want to use the file I/O to move around in the text on disk vs reading the text into a buffer/array/String and moving around in the text in memory?
Results 1 to 6 of 6