lazy_cod3R
07-20-2001, 08:49 PM
Hi All,
I need some help on copying binary files. For example i have a wave file and i want to write a peice of java code that will read this wave file and write it else where and not correupt the wave file but still allow it to be playable.
At current time i have tried to read it byte by byte and write it again but this doesnt work, then i tried to read it as a string , line by line and it doesnt write the whole wave file properly.
What im trying to do is make a voice chat program. I need to send the wave file to a remote object on another machine. The only method i can think of doing this right now is to read the wav file byte by byte or line by line, store each line or byte in an array list and send that arraylist through the network, i can send the data properly but when i traverse the arraylist and try to write the contents of it back to a file to play it, the file is total corrupted.
that is why i need help on how to read the wav file properly so it isnt corrupted when i send it through the network, what would be the general method of doing this ...
Any help is appreciated
Thanx
I need some help on copying binary files. For example i have a wave file and i want to write a peice of java code that will read this wave file and write it else where and not correupt the wave file but still allow it to be playable.
At current time i have tried to read it byte by byte and write it again but this doesnt work, then i tried to read it as a string , line by line and it doesnt write the whole wave file properly.
What im trying to do is make a voice chat program. I need to send the wave file to a remote object on another machine. The only method i can think of doing this right now is to read the wav file byte by byte or line by line, store each line or byte in an array list and send that arraylist through the network, i can send the data properly but when i traverse the arraylist and try to write the contents of it back to a file to play it, the file is total corrupted.
that is why i need help on how to read the wav file properly so it isnt corrupted when i send it through the network, what would be the general method of doing this ...
Any help is appreciated
Thanx