Interview Question
Java DevelopersCountry: India
You should try serialization to send the recorded voice over network. please find below the steps:-
1. Create a simple pojo class and it should implement serializable interface.
2. Create setter and getter for a property that must be byte array type
for example :-
Class AudioSerial implements serialization{
private byte[] audio = null;
}
3. Store the audio into this property as byte array.
4. Serialize above pojo class over the network and deserialize in the same way on targeted path where you want to store and play this audio.
Hope it will work...
Use UDP protocol instead of TCP to avoid the delay of ACK (in case of TCP). I had done this quite a long time ago using JMX.
- Sharath Nagendran November 03, 2013