controller:读取流
@RequestMapping(value = "audioListen")
@ResponseBody
public String getAudio(HttpServletRequest request, HttpServletResponse response,@RequestParam String path) throws Exception{
if (path!=null) {
String range = request.getHeader("Range");
String[] rs = range.split("\\=");
range = rs[1].split("\\-")[0];
File file = new File(path);
if(!file.exists()) throw new RuntimeException("音频文件不存在 --> 404");
OutputStream os = response.getOutputStream();
FileInputStream fis = new FileInputStream(file);
long length = file.length();
// 播放进度
int count = 0;
// 播放百分比
int percent = (int)(length * 1);
int irange = Integer.parseInt(range);
length = length - irange;