code: public static long copyAndCloseBoth(InputStream input, OutputStream output) throws IOException {
  		try (InputStream inputStream = input) {
  			return copyAndCloseOutput(inputStream, output);
  		}
  	}
docs: Copy input to output and close both the input and output streams before returning