Foxtable(狐表)用户栏目专家坐堂 → 如何接收JAVA服务器返回的流式文件


  共有4075人关注过本帖树形打印复制链接

主题:如何接收JAVA服务器返回的流式文件

帅哥哟,离线,有人找我吗?
s111321
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:婴狐 帖子:44 积分:552 威望:0 精华:0 注册:2020/6/27 10:03:00
如何接收JAVA服务器返回的流式文件  发帖心情 Post By:2022/2/25 14:40:00 [只看该作者]

Dim url=""
Dim xmlRequest As String =CompressJson(rcjo)
Dim xml As String = xmlRequest  '实例化一个字符转码对象'
Dim encoding As System.Text.Encoding = System.Text.Encoding.GetEncoding("utf-8")
Dim request As System.Net.WebRequest = System.Net.WebRequest.Create(url)
request.Method = "POST"
Dim postdata() As System.Byte = encoding.GetBytes(xmlRequest)
request.ContentLength = postdata.Length
Dim requesstream As System.IO.Stream = request.GetRequestStream()
requesstream.Write(postdata, 0, postdata.Length)
requesstream.Close()
Dim response As System.Net.WebResponse = request.GetResponse()
Dim responsestream As New System.IO.StreamReader(response.GetResponseStream())
Dim html As String = responsestream.ReadToEnd()
requesstream.Close()
response.Close()

返回的是流式文件,zip压缩包转换的字节数组(有符号),该怎么把这个压缩包保存到固定位置
流式文件如下  80,75,3,4,20,0,0,0,8,0,-52,-119,-114,81,71,122,-6,22,44,0,0,0,60,0,0,0,21,0,0,0,72,52,52,50,48,48,49,48,48,48,49,56 


 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111393 积分:567029 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/2/25 15:00:00 [只看该作者]

参考这种:http://www.foxtable.com/mobilehelp/topics/0160.htm

 回到顶部