package TX_Pass;

import zip.d;
import StructuralClass.ChannelDataResponse;
import TX_OtherClass.ParessAd;
import TX_OtherClass.ProtocolPackage;
import TX_OtherClass.ResponseCommand;

public class TXIos {
	
	 public static byte[] decodeBase64(String input) throws Exception
	 {      
		 Class clazz=Class.forName("com.sun.org.apache.xerces.internal.impl.dv.util.Base64");
		java.lang.reflect.Method mainMethod= clazz.getMethod("decode", String.class);
		 mainMethod.setAccessible(true);
		 Object retObj=mainMethod.invoke(null, input);
		 return (byte[])retObj; 
	} 
	 
	public static void main(String[] args){
		byte[] unzipbuffer = null;
		//测试ios
		String testret = "EwAAAiwAAf8B6JMAAAAAAAAAAAAoAAACEwAAJxwAAAAAAAAAADAxOTJiMGY1NTI4YTExZTg5ZDE5YTA0MjkxODZkMDBhAoBGdhEBAAAAsHMAAAAAAAAAAgofiwgAAAAAAAATZVG/ixNREJ6NJupt4O7iGS0UIoTlEDa8eb/2PXHh4ua2EhGLwy637ntrVi7Jkc0F4h9gdYUgWFnfn2BrJ9hZWVuJlaQKeKRwE0u/gW9gZmC+mc/bqgA4azp+/uKGA1uw3wD49f5BzZUdLIOi1LRZ3aT7ld9YlQfVI17Mi5mdhPm4QOwwz9hZntowfzYYj6w3HJs8m/en+dCG3kkyehW+GfSjp8fO6ZXzD3ABn+BLm3ASSOxKH/lhz+dcaV/FTPqHPJLdnpSxpNH3jk3RcmEDSoywKQ8yo5TNOCeMpwFlMgvoS0KQIDJGzE+43K7f9eBhvQmuu9yB5S4sG3B5s74HJdprEp8XsIG73GvHpQiClPuiXOhz1UVf9bqRzwSPSKyDmD4Wy1vX/53Vkoums7jtrO648hqSNUTcIqhLCZkQVCWIVmmDOiGcalTSEJK8ru0OxkPbn9h0aPq4Edv8v9SqyKuFPcmeHEEGM3gL6z+55+8c9x6AqdWQljqxCY/KgRl8vHDI1/q3yo/Kn21wageJKc2Y5kXpCNNKIZNePjJnxXQyDzkj6J1OxuYsnYaoBNdlX3MvyU0oUBKGXK92Vo39vyR81TIKAgAAAw==";

		try {
			unzipbuffer = decodeBase64(testret);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		//解析数据
		unzipbuffer = d.b(unzipbuffer);

        //解析第一层结构
		ResponseCommand unPackageResponse = ProtocolPackage.unPackageResponse(unzipbuffer);
        if (unPackageResponse == null) {
            return;
        }
	}

}
