code:     protected void finish() throws IOException {
  
          if (!response.isCommitted()) {
              // Validate and write response headers
              try {
                  prepareResponse();
              } catch (IOException e) {
                  // Set error flag
                  error = true;
              }
          }
  
          if (finished)
              return;
  
          finished = true;
  
          // Add the end message
          if (error) {
              output(endAndCloseMessageArray, 0, endAndCloseMessageArray.length);
          } else {
              output(endMessageArray, 0, endMessageArray.length);
          }
      }
  
  
      // ------------------------------------- InputStreamInputBuffer Inner Class
  
  
      /**
       * This class is an input buffer which will read its data from an input
       * stream.
       */
  