FileReader vs FileInputReader. split vs Pattern

Posted by abdeslam on Stack Overflow See other posts from Stack Overflow or by abdeslam
Published on 2010-06-15T22:49:05Z Indexed on 2010/06/15 22:52 UTC
Read the original article Hit count: 397

Filed under:
|
|

I'm working with a file with about 2G. I want to read the file line by line to find some specific terms. Whitch class can I better use: FileReader or FileInputStream? And how can I find the specific words efficiently. I'm just using the split() method, but may be can I use the java.util.regex.Pattern class in combination with java.util.regex.Matcher class.

So the Questions are: which class can I use: the FileReader or the FileInputStream? can I use the split method or the regex classes

Does someone has an answer to this questions? Thans.

© Stack Overflow or respective owner

Related posts about split

Related posts about filereader