Search:

Type: Posts; User: Kerr

Search: Search took 0.14 seconds.

  1. Replies
    20
    Views
    4,548

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

    Ok, I have maybe finished the tokenizer class now. Dont think its perfect, far from it. So I thought I would post it here and if anyone has any input feel free to give it :). It is meant to be a part...
  2. Replies
    20
    Views
    4,548

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

    Since I would have to step through the characters anyway I just figured I might just as well use the read() method.
  3. Replies
    20
    Views
    4,548

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

    Think I missunderstood your post, lol. Thought you mean that I should read an entire line (the "readLine" method) and then go through it rather then just go through it (the "read" method):P.

    May...
  4. Replies
    20
    Views
    4,548

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

    Dont think I have to read the file per-line tbh. BufferedReader has a rather large internal buffer (8192 characters) that it appear to fill, so that should be more then enough :).
  5. Replies
    20
    Views
    4,548

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

    I know, which is one of the reasons I hesitate to do that. Dont think it is too much of a problem, since this is not a serious thing, but I prefer to do it in a good way. Atm I am using a...
  6. Replies
    20
    Views
    4,548

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

    I am not sure, hence the question. Quite new to this, and my way of learning tend to be to jump into it head first and see what works and not. So you can say that this is just one giant training...
  7. Replies
    20
    Views
    4,548

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

    I suppose I could just read the entire file into a string and then move through it. Would it be better then using a BufferedReader (like I am now)?
  8. Replies
    20
    Views
    4,548

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

    The second one I guess. Let me take an example. If the first character the tokenizer finds is a letter it will create a string containing that letter and all letters that follows. When it encounters...
  9. Replies
    20
    Views
    4,548

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

    To clarify, though, I didnt mean that I am new to IO but to parsing text files. Really not sure how to do it (and I am of course talking about the IO part of parsing a text file). But looking at that...
  10. Replies
    20
    Views
    4,548

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

    Hi all.

    I have been playing around with parsing text files. Basically what I want to do is to create a tokenizer (Lexical analysis - Wikipedia, the free encyclopedia), but I am unsure what the...
Results 1 to 10 of 10