tags:

views:

70

answers:

1

Can anybody give me some clue that how to convert binary string into a string(english). I have tried and googled so much but couldn't find an answer.

Here is my code:

InputStream iStream = getApplicationContext().getResources().openRawResource(R.raw.map);
InputStreamReader input;
String line = "";
//char character[] = null;
//String res = "";
input = new InputStreamReader(iStream); 
BufferedReader bf = new BufferedReader(input);

Log.i("Helloo i am above variable", "Variable");

try {
    line = bf.readLine();
} catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}
Log.i("hello helloo", line.toString());

Thanks in advance.

A: 

Have you tried the constructor InputStreamReader(InputStream in, Charset charset) with Charset.forName("UTF-8") as Charset? However, if you try representing data which is other than a string, this won't give you any, except maybe something ugly or an error...

Sephy
its a binary map file which contains all kind of data. need to parse that file into its orignal form.
sajjoo