2011-05-12 55 views
1

org.apache.http可以使用多部分?解析器为多部分格式

我送与头Range : bytes=0-500,9000-9999

http请求我得到的文件格式:

--00000000000000001873 
Content-Type: audio/mpeg 
Content-Range: bytes 0-8999/4593415 

ID3....bytes.... 
...bytes® 
--00000000000000001873 
Content-Type: audio/mpeg 
Content-Range: bytes 9000-9999/4593415 

ф....bytes... 
...bytes 
--00000000000000001873-- 

如何只拿个字节?

回答

0

你需要知道的边界(应在主响应报头中定义)

当你看到边界可以解析的副标题找出如下(在这种情况下,内容类型和-range

注:边界被定义为在头只发现来界定他们