in src/org/jetbrains/plugins/ipnb/format/IpnbParser.java [166:190]
private static void writeToFile(@NotNull final String path, @NotNull final String json) {
final File file = new File(path);
try {
final FileOutputStream fileOutputStream = new FileOutputStream(file);
final OutputStreamWriter writer = new OutputStreamWriter(fileOutputStream, Charset.forName("UTF-8").newEncoder());
try {
writer.write(json);
}
catch (IOException e) {
LOG.error(e);
}
finally {
try {
writer.close();
fileOutputStream.close();
}
catch (IOException e) {
LOG.error(e);
}
}
}
catch (FileNotFoundException e) {
LOG.error(e);
}
}