Monday, April 19, 2010

Parse File Using Scanner - Java Implementation

Code snippet to parse a file using java.util.Scanner class.





Usage: Call the tokenizeUsingScanner method and pass it the File object and the delimiter for the file.
Note: The pipe symbol has special meaning in a regex -- so you need to escape it.

No comments: