title: How to determine the delimiter in CSV file
body: <p>I have a scenario at which i have to parse CSV files from different sources, the parsing code is very simple and straightforward. </p>
  
  <pre><code>        String csvFile = "/Users/csv/country.csv";
          String line = "";
          String cvsSplitBy = ",";
          try (BufferedReader br = new BufferedReader(new FileReader(csvFile))) {
              while ((line = br.readLine()) != null) {
                  // use comma as separator
                  String[] country = line.split(cvsSplitBy);
                  System.out.println("Country [code= " + country[4] + " , name=" + country[5] + "]");
              }
          } catch (IOException e) {
              e.printStackTrace();
          }
  </code></pre>
  
  <p>my problem come from the CSV delimiter character, i have many different formats, some time it is a <code>,</code> sometimes it is a <code>;</code></p>
  
  <p>is there is any way to determine the delimiter character before parsing the file</p>