code: public void finish() throws IOException {
          if (printWriter != null) {
              printWriter.close();
          }
  
          if (outputStream != null) {
              outputStream.close();
          }
      }
docs: Finish response stream by closing.
  @throws IOException