Skip to content

Instantly share code, notes, and snippets.

@ojacobson
Created September 10, 2013 19:16
Show Gist options
  • Save ojacobson/6514227 to your computer and use it in GitHub Desktop.
Save ojacobson/6514227 to your computer and use it in GitHub Desktop.
void writeFoo(File file, Structure data) throws IOException {
try (OutputStream fout = new FileOutputStream(file)) {
writeHeader(fout); // writeHeader is marked 'throws IOException' and contains no try/catch
writeContent(fout, data); // ditto
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment