Reputation: 1505
I have a java program that receives a 3gp audio file (single file, not stream) sent from the sender in an array of bytes (byte [])
Now, either I need to play this file or, I should be able to save it in 3gp format
Example:
byte[] Audiobytes = received3GPAudioFlie();
Now I want to be able to deal with this Audiobytes in the example. I have two separate goals,
I want to save it as a 3GP file
I want to be able to play it as audio file. Thanks.
Please help!
Upvotes: 0
Views: 723
Reputation: 6480
If by handle you mean
1) Write bytes to file (save the file) then you can do it as follows:
fileOutputStream fos = new FileOutputStream(strFilePath);
fos.write(AudioBytes);
2) Play the file Playing audio files in Java
Upvotes: 1