🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

help about byte - integer conversion

#492
From: Leo (F.Hou)
Date: Fri, 27 Jun 2003 21:43
21 lines
1500 bytes
Hi experts,

I need to write a program works as follows:

1.read bytes in, block by block, from a file; convert to BigInteger; apply a
function; serialize the result

2.some one else deserialize the result; apply the inverse function; write
bytes back to restore the file.


Question: The program I have now can do ASCII files but not other types. The
reason I concluded is the value 0x00 or consecutive 0x00 is possible to be
at the beginning of a block, thus be ignored in the conversion.

Can anyone suggest a way to solve this?

Thanks a lot


Leo
Technical Details
Message-ID: <bdidqj$s8j$1@pegasus.csx.cam.ac.uk>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!server1.netnews.ja.net!pegasus.csx.cam.ac.uk!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,3a7d9c51fc987fdc,start
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2003-06-27 14:43:51 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!server1.netnews.ja.net!pegasus.csx.cam.ac.uk!not-for-mail
From: "Leo \(F.Hou\)" <fh235@nospam.cam.ac.uk>
Newsgroups: borland.public.jbuilder.java.api
Subject: help about byte - integer conversion
Date: Fri, 27 Jun 2003 22:43:49 +0100
Organization: University of Cambridge, England
Lines: 23
Message-ID: <bdidqj$s8j$1@pegasus.csx.cam.ac.uk>
NNTP-Posting-Host: fh235.girton.cam.ac.uk
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200