I realize this was long ago answered but want to suggest an additional approach that avoids the nested try-with-resources double block.
I realize this was long ago answered but want to suggest an additional approach that avoids the nested try-with-resources double block.