Use autoclosable for Java 7:
```
try (CSVWriter writer = new CSVWriter(new PrintWriter(values))) {
  writeCSVValues(writer, table);
}
```