All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rt.core.beans.IOCallbackImpl Maven / Gradle / Ivy

There is a newer version: 1.1.17
Show 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 abstract class IOCallbackImpl implements IOCallback {

	/**
	 * 处理头信息
	 * 
	 * @param info info
	 */
	public void headerInfo(JSONObject info) {
	}

	public void responseNot200(HttpClient httpClient,
			HttpResponse httpResponse) {
	}

	/**
	 * 获取缓存大小 返回0 由容器自动创建.
	 * 
	 * @return int 1024 default
	 */
	public int getBufferSize() {
		return 1024;
	}

	abstract public OutputStream getOutputStream();

	public void outputProcess(long contentLength, int read, int index,
			long readCount) {
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy