Is it possible to convert an audio mp3 file to a string data for sending data to the server, and server will return a string data to my app i want to convert that data to mp3 file and play audio.
I am using this code to convert mp3 file to string data
public static String readFileAsString(String filePath) throws java.io.IOException {
BufferedReader reader = new BufferedReader(new FileReader(filePath));
String line, results = "";
while( ( line = reader.readLine() ) != null)
{
results += line;
}
reader.close();
return results;
}
i don't know how to get back my mp3 file from converted strind data.
If possible then how ? anybody help me.
Or any other solution for this requirement tell me: i want to pass audio and video files to server and get back from the server to use in app.