如何从 ASP 中的 ADODB 流中读取字节值数据?

发布于 2024-08-30 22:59:10 字数 522 浏览 1 评论 0原文

我有一个 ASP 例程,它获取二进制文件的内容并将其写入流。目的是从流中读取它并在服务器上处理它。

所以我有:

ResponseBody = SomeRequest (SomeURL) ;

var BinaryInputStream = Server.CreateObject ("ADODB.Stream") ;
BinaryInputStream.Type = 1 ; // binary
BinaryInputStream.Open ;
BinaryInputStream.Write (ResponseBody) ;
BinaryInputStream.Position = 0 ;

var DataByte = BinaryInputStream.Read (1) ;

Response.Write (typeof (DataByte)) ; // displays "unknown"

如何获取刚刚从流中读取的字节的字节值?

Asc() 和 byte() 不起作用 (JScript)

TIA

I have an ASP routine that gets a binary file's contents and writes it to a stream. The intention is to read it from the stream and process it at the server.

So I have:

ResponseBody = SomeRequest (SomeURL) ;

var BinaryInputStream = Server.CreateObject ("ADODB.Stream") ;
BinaryInputStream.Type = 1 ; // binary
BinaryInputStream.Open ;
BinaryInputStream.Write (ResponseBody) ;
BinaryInputStream.Position = 0 ;

var DataByte = BinaryInputStream.Read (1) ;

Response.Write (typeof (DataByte)) ; // displays "unknown"

How do I get the byte value of the byte I have just read from the stream?

Asc () and byte () don't work (JScript)

TIA

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忆沫 2024-09-06 22:59:10

无奈之下我又问了一遍这个问题,问题就解决了。请参阅 获取二进制文件的访问权限经典 asp/JScript 中的逐字节响应

I asked this question again in desperation and solved the problem. See Getting access to a binary response byte-by-byte in classic asp/JScript

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文