开发者

How do you read data from a ADODB stream in ASP as byte values?

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
Binar开发者_如何学JAVAyInputStream.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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜