I've a properties file (say exmp.properties) which is something like this
1. k5=500
2. k4=400
3. k3=300
4. k2=200
5. k1=100
I need to reverse the content of this file like
1. k1=100
2. k2=200
3. k3=300
4. k4=400
5. k5=500
Is there any way I can achieve this using ANT task or Java code?
Here's a solution with loadresource and nested filterchain.
To make it work correctly your propertyfile needs a linefeed after last property, means :
snippet :
output :