Article View: borland.public.jbuilder.java.language
Article #15962Integer class
From: Jason C. Leach
Date: Sun, 11 Apr 1999 00:00
Date: Sun, 11 Apr 1999 00:00
34 lines
1506 bytes
1506 bytes
Hi,
I need a hand with the Integer class. I am using FileInputStream and
Output stream. What I do is read in a byte and store it in a Integer
object (I think):
tmp = new Integer(fin.read()); //where tmp is passed into my method as a
Integer.
Then it should return after some error checking.....
Now in the calling method, once that value has been fetched I need to
check it agains a HEX value. Here is where I get confused. In C/C++ I
read the byte in as a char, this is good because a byte is a char. But
in Java I use int, and that is 4 bytes. I don't get it. And this causes
more trouble as I need to compair this just read in byte of data against
a HEX character '0x001'.
Can anyone help with sorting out my confusion. And with the comparison
syntax?
myInteger.equals(?????); aint going to work
jason
--
�,+���+,��,+���+,�*
....Jason C. Leach
..."Many Hands Make Light Work."
..- Unknown
-- PGP key on server: pgpkeys.mit.edu
Technical Details
Message-ID:
<3710E522.7A438C7E@hotmail.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f74b3,48b0db82994ba0f7,start X-Google-Attributes: gidf74b3,public From: "Jason C. Leach" <leachjc@hotmail.com> Subject: Integer class Date: 1999/04/11 Message-ID: <3710E522.7A438C7E@hotmail.com> X-Deja-AN: 465172064 Content-Transfer-Encoding: 8bit X-Accept-Language: en Content-Type: text/plain; charset=iso-8859-1 Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language