Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // File consists of json objects
- FileInputStream inputStream = null;
- Scanner sc = null;
- try {
- inputStream = new FileInputStream(file_path);
- sc = new Scanner(inputStream, "UTF-8");
- while (sc.hasNextLine()) {
- String line = sc.nextLine();
- JsonObject json = new JsonParser().parse(line).getAsJsonObject();
- //...
- }
- inputStream.close();
- sc.close();
- } catch (Exception e) {
- logger.error("Error occured while indexing observations dump file.", e);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement