java - AudioInputStream to base64 -


i'm using code read audio files http get requests , mixing them up. end audioinputstream. if write file (ais audioinputstream) code bellow file created success , if try read javascript can base64 of file no problems.

audiosystem.write(       ais       ,audiofileformat.type.wave       ,new file("test.wav")); 

but need audioinputstream extract byte array (and convert base64 send other part of code. can't save file disk, need application memory

managed writing bytearrayoutputstream instead , converting byte array base64

baos = new bytearrayoutputstream();  audiosystem.write(        ais        ,audiofileformat.type.wave        ,baos);  audioinbytearray = baos.tobytearray(); 

Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -