<commit_before>package com.continuuity.http;

import org.jboss.netty.buffer.ChannelBuffer;

/**
 * HttpHandler method would extend this abstract class to stream the body directly.
 * chunk method would receive the http-chunks of the body and finished would be called
 * on receipt of the last chunk.
 */
public abstract class BodyConsumer {
  /**
   * Http request content will be streamed directly to this method.
   * @param request
   * @param responder
   */
  abstract void chunk(ChannelBuffer request, HttpResponder responder);

  /**
   * This is called on the receipt of the last HttpChunk.
   * @param responder
   */
  abstract void finished(HttpResponder responder);

  /**
   * When there is exception on netty while streaming, it will be propagated to handler
   * so the handler can release resources.
   * @param cause
   */
  abstract void handleError(Throwable cause);
}<commit_msg>doc changes<commit_after>package com.continuuity.http;

import org.jboss.netty.buffer.ChannelBuffer;

/**
 * HttpHandler would extend this abstract class and implement methods to stream the body directly.
 * chunk method would receive the http-chunks of the body and finished would be called
 * on receipt of the last chunk.
 */
public abstract class BodyConsumer {
  /**
   * Http request content will be streamed directly to this method.
   * @param request
   * @param responder
   */
  abstract void chunk(ChannelBuffer request, HttpResponder responder);

  /**
   * This is called on the receipt of the last HttpChunk.
   * @param responder
   */
  abstract void finished(HttpResponder responder);

  /**
   * When there is exception on netty while streaming, it will be propagated to handler
   * so the handler can do the cleanup.
   * @param cause
   */
  abstract void handleError(Throwable cause);
}
{'fraction_non_alphanumeric': 0.07190265486725664, 'fraction_numerical': 0.0, 'mean_word_length': 3.579746835443038, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '367666', 'n_tokens_mistral': 487, 'n_tokens_neox': 469, 'n_words': 208}