public String mergeAmrUrl(List<String> amrUrlList ){
try{
AtomicInteger length = new AtomicInteger(6);
List<byte[]> bytes = Lists.newLinkedList();
amrUrlList.forEach(fileUrl->{
try{
URL url = new URL(fileUrl);
InputStream fin = url.openStream();
ByteArrayOutputStream bos=new ByteArrayOutputStream();
byte[] buffer=new byte[1024];
int len=0;
while((len=fin.read(buffer))!=-1){
bos.write(buffer,0,len);
}
fin.close();
bos.flush();
byte[] result=bos.toByteArray();
bytes.add(result);
length.addAndGet(result.length-6);
fin.close();
}catch (Exception
AMR音频合并
最新推荐文章于 2022-12-07 15:02:36 发布