Hi,
I am trying to write a JAVAcode for deleting spaces from Text file.I have a following scenario.
I have a text file like
STARTBUR001 20120416
20120416MES201667 20120320000000000201203210000000002012032200000000 02012032300000000020120324000000000201203260000000 00201203270000000002012032800000000020120329000000 00020120330000000000
20120416MES202566 20120305000000000201203060000000002012030700000000 02012030800000000020120309000000000201203100000000 00201203110000000002012031200000000020120313000000 0002012031400000000020
20120416MES275921 20120305000000000201203060000000002012030700000000 02012030800000000020120309000000000201203100000000 00201203110000000002012031200000000020120313000000 00020120314000000000
END 0000000202
Here all lines are single lines.
But what i want is like
STARTBUR001 20120416
20120416MES201667 20120320000000000201203210000000002012032200000000 02012032300000000020120324000000000201203260000000 00201203270000000002012032800000000020120329000000 00020120330000000000
20120416MES202566 20120305000000000201203060000000002012030700000000 02012030800000000020120309000000000201203100000000 00201203110000000002012031200000000020120313000000 0002012031400000000020
20120416MES275921 20120305000000000201203060000000002012030700000000 02012030800000000020120309000000000201203100000000 00201203110000000002012031200000000020120313000000 00020120314000000000
END 0000000202
So in all i want to start checking from second line till i encounter END and delete all spaces at the end of each line.
Can someone guide me for writing this code??