()
| 353 | final static int SEARCH_BREAK = 3; |
| 354 | |
| 355 | public Vector iData() { |
| 356 | String filecontents=loadFile(); |
| 357 | Vector vector=new Vector(); |
| 358 | if (filecontents!=null) { |
| 359 | try { |
| 360 | int pos=0; int start_pos=0; int end_pos=0; |
| 361 | |
| 362 | while (true) { |
| 363 | String key=null; String value=null; String tempstr=null; |
| 364 | start_pos=filecontents.indexOf("<i>",pos); end_pos=filecontents.indexOf("</i>",pos); |
| 365 | |
| 366 | if (start_pos>-1 && end_pos>-1) { |
| 367 | tempstr=filecontents.substring(start_pos+3, end_pos); |
| 368 | key=findBlock(tempstr, "k"); |
| 369 | value=findBlock(tempstr, "v"); |
| 370 | vector.addElement(new keyValue(key, value)); |
| 371 | } else |
| 372 | break; |
| 373 | |
| 374 | pos=end_pos+4; |
| 375 | } |
| 376 | } catch (Exception e){ } |
| 377 | } |
| 378 | |
| 379 | filecontents = null; |
| 380 | return vector; |
| 381 | } |
| 382 | |
| 383 | private String findBlock(String source, String needle){ |
| 384 | int start =source.indexOf("<"+needle+">"); |
no test coverage detected