• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Configuring Servers or have to use existing or have to make a new?

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working with a audio-streaming web-app and i want my applet to transmit data to the server where i can grab the data and save it at server site.
a) Can Weblogic be configured to recieve data from the applet? if so how can it be done?
b) Is there any open source media server like Adobe media server (which is for flash a/v data) which can be used with the applet(as client). ?
c) I coded a server to recieve the AudioInputStream as:...




I get a file recorded as hello.au but the problem is : on playing the file using any player like VLC the sound is not what was sent from client instead its something not understandable.. beeps and blurred sound.

THANKS ALOT FOR READING THIS AND YOUR REPLIES .
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You seem to be having a problem in getting data to the server. Check out apache commons file upload http://commons.apache.org/fileupload/
 
Ackshat Sharma
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@ Maneesh sir, its not a file upload problem as it can also be done using api like cos.jar and making a servlet to handle the file that is posted from a form by POST method, I am capturing a audio using applet and transmitting the captured audio to the server (in the code mentioned), the server is recieving the data and writing it to the disk but the on playing the audio file the sound is not what was sent.

here is the code i am using to write the AudioInputStream to the socket


 
Ackshat Sharma
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks a lot everyone for your concern, I have solved this problem.
 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since some tried to help you, it would be nice to know how you solved it in case others in the future have the same problem.

WP
 
Ackshat Sharma
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how i solved it:
a) the InputStream cannot be typecasted to AudioInoutStream hence have to first store the data chunks in BufferedInputStream
b) then using a AudioInputStream constructor AudioInputStream (InputStream in, AudioFormat format, long length), where the bufferedInputStream in passed in the argument as inputStream and the format is obtained by using getAudioFormat() method and similarily the method getFrameLength gives out the length thus passing all arguments in the constructor gives the correct audioInputStream .

The problem i found is i was trying to use the constructor of AudioInputStream without knowing the metadata of the recieved datachunks so first the metadata must be known and then only the constructor is used.

and this is done using BufferedInputStream storage which first store data chunks in buffer then gives out the metadata and this metadata is used to create the object stream.
 
Yeah, but how did the squirrel get in there? Was it because of the tiny ad?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic