🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #2256

Reading Binary Inbound Data

#2256
From: Harry Whitehouse
Date: Fri, 13 Apr 2001 01:23
29 lines
1828 bytes
I have a legacy applet which will respond to a certain HTTP query with a
binary string of several hundred bytes.

I can't seem to find a way to capture the incoming stream without getting
messed up by the world of Unicode.  For instance, I know I'm expecting a
byte \x89, but it appears as a \u2030.  That's no fun!

I send the message just fine with:

        URL url = new URL(URLName);
         URLConnection uc = url.openConnection();
         uc.setDoOutput(true);
         uc.setDoInput(true);
          uc.setUseCaches (false);

         DataOutputStream dos = new DataOutputStream(uc.getOutputStream());
         // Send the data
         dos.writeBytes(raterequest);
         dos.flush();
         dos.close();  // this all works!!

I've tried a dozen permutations of InputStreamReader and BuffererReader to
capture my result, but I can't seem to get those \x8_  bytes which are
represented in Unicode.  Can I perform a simple conversion of some type on
these unicode characters or int's?

TIA

Harry
Technical Details
Message-ID: <3ad65506$1_1@dnews>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!bignews.mediaways.net!blackbush.xlink.net!newsfeed01.sul.t-online.de!t-online.de!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,4a3fb8076f986f21,start
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-04-12 18:45:17 PST
From: "Harry Whitehouse" <harry@envmgr.com>
Newsgroups: borland.public.jbuilder.java.api
Subject: Reading Binary Inbound Data
Date: Thu, 12 Apr 2001 18:23:23 -0700
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 38.168.115.135
Message-ID: <3ad65506$1_1@dnews>
X-Trace: dnews 987124998 38.168.115.135 (12 Apr 2001 18:23:18 -0700)
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!bignews.mediaways.net!blackbush.xlink.net!newsfeed01.sul.t-online.de!t-online.de!dnews