docs: public void finish() throws IOException
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
          { // 306998.15
              Tr.debug(tc, "finish");
          }
  
          if (length == -1 && total != 0)
              length = total;
  
          //PM71666 - DBCS and application calls out.close(), the length set here is not correct (depending on # of bytes for each character)
          //          It will be more length by the time the data is encoded by the JDK sun.nio.cs.StreamEncoder, so more bytes are
          //          sent to client than specified in content-length.  Those extra will be dropped by the client without any exception.
          if (WCCustomProperties.SET_CONTENT_LENGTH_ON_CLOSE){
              if (!committed)
              {
                  // first write on the close/finish path should set an explicit
                  // content-length if we can
                  if (!_hasFlushed && obs != null)
                  {
                      if (!this.response.isCommitted())
                      {
                          setContentLengthHeader(length);
                      }
                      _hasFlushed = true;
                      obs.alertFirstFlush();
                  }
                  committed = true;
              }
          } //PM71666
          flush();
      }