using java 7 auto close statement.