Created
February 12, 2018 06:40
-
-
Save seenimohamed/de467787901303798708a026237f208d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static CSVRecord convertToCSVRecord(String query, char delimiter) { | |
try { | |
Reader in = new StringReader(query); | |
CSVParser parser = CSVFormat.newFormat(delimiter).parse(in); | |
List<CSVRecord> recorder = parser.getRecords(); | |
return recorder.get(0); //returning first element | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment