FileReader vs FileInputReader. split vs Pattern
- by abdeslam
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.