package com.sabirjan.CaoZuoTXT;

import java.io.InputStream;

import org.apache.http.util.EncodingUtils;

import android.content.Context;

public class HuoquMinZudaima {

	
	public String  GetMinZuDaiMa(Context con)
	{
		String fileName ="Words/minzudaima.txt";//文件名字

		String res="";  

		try{  

		  InputStream in = con.getResources().getAssets().open(fileName);

		  // \Test\assets\yan.txt这里有这样的文件存在

		  int length = in.available();   

		byte [] buffer = new byte[length];   

		in.read(buffer);   

		res = EncodingUtils.getString(buffer, "UTF-8");   

		}catch(Exception e){  

		  e.printStackTrace();   

		  }
		return res;
	}
	public String  GetRayonInfo(Context con)
	{
		String fileName ="mobile/000.txt";//文件名字

		String res="";  

		try{  

		  InputStream in = con.getResources().getAssets().open(fileName);

		  // \Test\assets\yan.txt这里有这样的文件存在

		  int length = in.available();   

		byte [] buffer = new byte[length];   

		in.read(buffer);   

		res = EncodingUtils.getString(buffer, "UTF-8");   

		}catch(Exception e){  

		  e.printStackTrace();   

		  }
		return res;
	}
}
