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

com.alibaba.ocean.rawsdk.client.serialize.DeSerializer Maven / Gradle / Ivy

The newest version!
/**
 * 
 */
package com.alibaba.ocean.rawsdk.client.serialize;

import java.io.IOException;
import java.io.InputStream;
import java.text.ParseException;

import com.alibaba.ocean.rawsdk.client.entity.ResponseWrapper;

/**
 * @author hongbang.hb
 *
 */
public interface DeSerializer {

	/**
	 *
	 * @return
	 */
	public String supportedContentType();

	/**
	 * 
	 * @param istream
	 * @param resultType
	 * @param charSet
	 * @return
	 * @throws IOException
	 * @throws ParseException
	 */
	public  ResponseWrapper deSerialize(InputStream istream,
			Class resultType, String charSet) throws IOException,
			ParseException;

	/**
	 * 
	 * @param inputStream
	 * @param statusCode
	 * @param charSet
	 * @return
	 * @throws IOException
	 * @throws ParseException
	 */
	public Throwable buildException(InputStream inputStream, int statusCode,
			String charSet) throws IOException, ParseException;

	/**
	 * 
	 * @param listner
	 */
	public void registeDeSerializerListener(DeSerializerListener listner);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy