Join Slack
Powered by
<@U5AJJA7MJ> Some general tips: Your code above do...
# tornadofx
e
edvin
05/17/2017, 7:04 AM
@nyxcharon
Some general tips: Your code above doesn't close the inputStream, so if you were to use such an approach you should wrap it in
inputStream.use {}
. The Java 8 Paths API provides a more concise way of doing line 1 from your example:
Files.newInputStream(Paths.get(dir))
. In any case, the
loadJsonArray
function solves these for you 🙂
2
Views
Open in Slack
Previous
Next