posted 13 years ago
process done::
----------------------
1.Recognize the folder ,then iterating each of the files.
2.Read each line of the file to skip the unnecessary data and read all the k,v pairs.
3.Put them in the TreeMap for the sorting based on values( while inserting i am reversing the places of k,v )
this process is done for all the files in the folder(here comes the problem as i mentioned)
4.Now convert the Tree Map to Linked Hash Map for the order to be maintained while writing in to a file where they are displayed as normal k,v pairs (ie; while writing to the file v,k pairs of Tree Map are converted to k,v pairs)
I wrote the code to display the file name first then the k,v pairs from that file
But the out put is that the first class k,v pairs are only read and the rest is skipped but the file names are being read.
In consideration of the reply::
-----------------------------------------
1.k,v refers to key, values.
2.The file in the directory contains data like the dat given bellow and same structure is found in all the files.
SearchRequest
TransactionInformation.TransactionControlNumber: 1371010101280003
TransactionInformation.Priority: null
FingerData.Position: 1
FingerData.Position: 2
FingerData.Position: 3
FingerData.Position: 4
FingerData.Position: 5
FingerData.Position: 6
FingerData.Position: 7
FingerData.Position: 8
FingerData.Position: 9
FingerData.Position: 10
TargetGalleries: fingerPlain-1,fingerLatent-1,exceptionFingerPlain,
SUCCESS
3272060107390021,3.0312126
3573021702300001,2.728711
3173015811550002,2.4808035
3328023112300007,2.1470318
3175036405300002,2.0835547
7371045209380001,1.4756335
1671046105520001,1.4315698
7502034101500001,1.1825134
3174095204390002,0.9443519
1306014503350001,0.7167574
3173014203420002,0.67425823
3171080502520003,0.46428326
3173010903500003,0.40578112
3175100112570005,0.328002
3171077112400014,0.32794788
3325074504530001,0.20473967
1371054509380001,2.3803377
3272026912410001,1.4075888
3171015707400001,0.82567614
3328131112500006,0.79991835
3171011804580003,0.72508544
7371071209680002,0.7185777
1903034506620003,0.44315025
3171016009600004,0.44152263
1371031512360001,0.4335363
3175071501490007,0.40575165
3175044211580002,0.3450352
3175072902720006,0.30085668
3576021305740003,0.27913237
6472050507640004,0.24619599
3327093110670004,0.18189958
1810041005700002,0.030490799
3.The problem is that the control is coming out of the while loops after reading the first line from the files to be more certain, i found the problem must be between the lines 41 to 54. when the iteration for 2nd file started, the variable is happening to null or the break statement is happening to be executed. since then the control is coming out of the loop.