Skip to content

Instantly share code, notes, and snippets.

@cozzin
Last active September 15, 2022 02:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cozzin/79df90545e5319ca5e70e8b591082adb to your computer and use it in GitHub Desktop.
Save cozzin/79df90545e5319ca5e70e8b591082adb to your computer and use it in GitHub Desktop.
OutputStream outputStream = null;
try {
outputStream = exchange.getResponseBody();
outputStream.write(content.getBytes());
outputStream.flush();
} finally {
if (outputStream != null) {
outputStream.close();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment