// Path: framework/util/http/exception/AuthorizationException.java
// public class AuthorizationException extends XmlParserException {
//     private static final long serialVersionUID = 1L;
// 
//     public AuthorizationException(String message) {
//         super(message);
//     }
// 
// }
// 
// Path: framework/util/http/exception/XmlParserException.java
// public class XmlParserException extends Exception {
//     
//     /**
//      * 
//      */
//     private static final long serialVersionUID = 3789211073927189813L;
//     private String mExtra;
// 
//     public XmlParserException(String errorMessage) {
//         super(errorMessage);
//     }
// 
//     public XmlParserException(String errorMessage, String extra) {
//         super(errorMessage);
//         mExtra = extra;
//     }
//     
//     public String getExtra() {
//         return mExtra;
//     }
// }
// 
// Path: framework/util/http/exception/XmlParserParseException.java
// public class XmlParserParseException extends XmlParserException {
// 
//     /**
//      * 
//      */
//     private static final long serialVersionUID = 3857089504256300868L;
// 
//     public XmlParserParseException(String errorMessage) {
//         super(errorMessage);
//     }
// }


import com.elphin.framework.util.http.exception.AuthorizationException;
import com.elphin.framework.util.http.exception.XmlParserException;
import com.elphin.framework.util.http.exception.XmlParserParseException;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.util.EntityUtils;
import org.json.JSONException;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.GZIPInputStream;
package com.elphin.framework.util.jsonparser;




public class ParserData {

    public static BaseObject analysisHttpResponseToObject(InputStream is,
            Parser<? extends BaseObject> parser, String encodeing)
            throws AuthorizationException, XmlParserParseException,
            XmlParserException, IOException {
        try {
            return parser.parse(BaseParser.createJSONParser(is, encodeing));
        } catch (JSONException e) {
            throw new XmlParserException("parser json exception");
        } catch (Exception e) {
            throw new XmlParserException("Exception");
        } finally {
            is.close();
        }
    }

    public static BaseObject analysisHttpResponseToObject(HttpResponse response,
            Parser<? extends BaseObject> parser, String encodeing)
            throws AuthorizationException, XmlParserParseException,
            XmlParserException, IOException {

// Path: framework/util/http/exception/AuthorizationException.java
// public class AuthorizationException extends XmlParserException {
//     private static final long serialVersionUID = 1L;
// 
//     public AuthorizationException(String message) {
//         super(message);
//     }
// 
// }
// 
// Path: framework/util/http/exception/XmlParserException.java
// public class XmlParserException extends Exception {
//     
//     /**
//      * 
//      */
//     private static final long serialVersionUID = 3789211073927189813L;
//     private String mExtra;
// 
//     public XmlParserException(String errorMessage) {
//         super(errorMessage);
//     }
// 
//     public XmlParserException(String errorMessage, String extra) {
//         super(errorMessage);
//         mExtra = extra;
//     }
//     
//     public String getExtra() {
//         return mExtra;
//     }
// }
// 
// Path: framework/util/http/exception/XmlParserParseException.java
// public class XmlParserParseException extends XmlParserException {
// 
//     /**
//      * 
//      */
//     private static final long serialVersionUID = 3857089504256300868L;
// 
//     public XmlParserParseException(String errorMessage) {
//         super(errorMessage);
//     }
// }


// Path: framework/util/jsonparser/ParserData.java
import com.elphin.framework.util.http.exception.AuthorizationException;
import com.elphin.framework.util.http.exception.XmlParserException;
import com.elphin.framework.util.http.exception.XmlParserParseException;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.util.EntityUtils;
import org.json.JSONException;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.GZIPInputStream;

package com.elphin.framework.util.jsonparser;




public class ParserData {

    public static BaseObject analysisHttpResponseToObject(InputStream is,
            Parser<? extends BaseObject> parser, String encodeing)
            throws AuthorizationException, XmlParserParseException,
            XmlParserException, IOException {
        try {
            return parser.parse(BaseParser.createJSONParser(is, encodeing));
        } catch (JSONException e) {
            throw new XmlParserException("parser json exception");
        } catch (Exception e) {
            throw new XmlParserException("Exception");
        } finally {
            is.close();
        }
    }

    public static BaseObject analysisHttpResponseToObject(HttpResponse response,
            Parser<? extends BaseObject> parser, String encodeing)
            throws AuthorizationException, XmlParserParseException,
            XmlParserException, IOException {

        int statusCode = response.getStatusLine().getStatusCode();