I convert one file in byte array in server and send as a by json string to Android Client.. by this code i convert that file :
FileInputStream fileInputStream=null;
File file = new File("C:\\testing.txt");
byte[] bFile = new byte[(int) file.length()];
try {
//convert file into array of bytes
fileInputStream = new FileInputStream(file);
fileInputStream.read(bFile);
fileInputStream.close();
}catch(Exception e){
e.printStackTrace();
}
and in Android Client i got the value like : "SGVsbG8gRG93bmxvYWQgaXMgd29ya2luZw==" (In String Type)
So how i convert this code into byte and convert in file and save in sd card?