Tool to validate data in flat files
===

Please suggest a tool to validate data in flat files like .csv , .dat etc by setting some rules.  I have only Java install on my system.

I have to validate fields for rules like - not null, data type, Max. char limit, values with specific prefix, if value of field1 is "X" then value of field2 should be "Y" etc.

Any pointers ?