com.rt.core.beans.IOCallback Maven / Gradle / Ivy
The newest version!
package com.rt.core.beans;
import java.io.OutputStream;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import com.json.JSONObject;
/**
* IO回调接口
*/
public interface IOCallback {
/**
* 处理头信息
*
* @param info info
*/
public void headerInfo(JSONObject info);
/**
* 返回结果不等于200时执行
*
* @param httpClient httpClient
* @param httpResponse httpResponse
*/
public void responseNot200(HttpClient httpClient, HttpResponse httpResponse);
/**
* 获取缓存大小 返回0 由容器自动创建.
*
* @return int
*/
public int getBufferSize();
/**
* 存储容器
*
* @return OutputStream
*/
public OutputStream getOutputStream();
/**
* InputStream while循环执行内容
*
* @param contentLength contentLength
* @param read read
* @param index index
* @param readCount readCount
*/
public void outputProcess(long contentLength, int read, int index,
long readCount);
}