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
Post a Comment