title: csv parsing & search in java
body: <p>I have a CSV file which looks like this</p>
  
  <pre><code>"key,"id.attr.id","id.attr.id1","id.attr.id2","id.attr.id7","id.attr.arry","id.attr.arry1","id.attr.arry2","id.attr.arry5","id.attr.arry4"
  // this header goes on for around next 600 field.
  
  "1","0",,,"8",,,"8",,"8"
  "2","3",,,"7",,,"7",,"7"
  "3","4",,,"8",,,"8",,"8"
  "4","5",,,"7",,,"7",,"7"
  "5","4",,,"8",,,"8",,"8"
  "6","3",,,"7",,,"7",,"7"
  "7","4",,,"8",,,"8",,"8"
  "8","5",,,"7",,,"7",,"7"
  "9","3",,,"8",,,"8",,"8"
  "10","6",,,"7",,,"7",,"7"
  </code></pre>
  
  <p>Now I'm trying to search through the content in such a way so that it will return the values 
  say for "id.attr.id" it will search for all the corresponding values. </p>
  
  <p>the format of the result will be </p>
  
  <pre><code>"key","id.attr.id","id.attr.id7"
      "1","0","8"
      "2","3","7"
      "3","4","8"
      "4","5","7"
      "5","4","8"
      "6","3","7"
      "7","4","8"
      "8","5","7"
      "9","3","8"
      "10","6","7"
  </code></pre>
  
  <p>and also for "id.attr.arry" </p>
  
  <p>Here is the code i'm trying.. but of no use.</p>
  
  <pre><code>public void run() {
      String csvFile = "/Users/file.csv";
      BufferedReader br = null;
      String line = "";
      String cvsSplitBy = ",";
  
      try {
  
          br = new BufferedReader(new FileReader(csvFile));
          while ((line = br.readLine()) != null) {
  
              // use comma as separator
              String[] id = line.split(cvsSplitBy);
              int j=0;
              for ( j:id.size()){
                   if (id[1]=="id.attr.id"+j){
  return true;
                       //don't know then how to check                     }
              else     {
                   int i=0;
                   }           }
  
          }
  </code></pre>
  
  <p>so my question is how to achieve this result?</p>