News:

Wieners, Brats, Franks, we've got 'em all.

Main Menu

[JAVA, W3XP, W3GS] Host Counter Decoding

Started by Lance, December 06, 2009, 01:22:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Camel

Quote from: Sidoh on December 08, 2009, 11:22:29 PM
(byte)Integer.parseInt should be in every way equivalent to Byte.parseByte...
No; parseByte() will throw an NFE if the number is too big, but the cast will simply truncate the high 24 bits. This is probably where the problem lies, since he said parseByte() doesn't work, when that's clearly what he should be using.

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Sidoh

Quote from: Camel on December 09, 2009, 12:59:23 AM
Quote from: Sidoh on December 08, 2009, 11:22:29 PM
(byte)Integer.parseInt should be in every way equivalent to Byte.parseByte...
No; parseByte() will throw an NFE if the number is too big, but the cast will simply truncate the high 24 bits. This is probably where the problem lies, since he said parseByte() doesn't work, when that's clearly what he should be using.

I guess I knew that, but I didn't think it was relevant.  Of course, by "in every way", I meant for there to be an implied "in this context...".

Lance

Quote from: Sidoh on December 09, 2009, 01:22:12 AM
Quote from: Camel on December 09, 2009, 12:59:23 AM
Quote from: Sidoh on December 08, 2009, 11:22:29 PM
(byte)Integer.parseInt should be in every way equivalent to Byte.parseByte...
No; parseByte() will throw an NFE if the number is too big, but the cast will simply truncate the high 24 bits. This is probably where the problem lies, since he said parseByte() doesn't work, when that's clearly what he should be using.

I guess I knew that, but I didn't think it was relevant.  Of course, by "in every way", I meant for there to be an implied "in this context...".
I went with the method you posted and everything has been good so far :)
Quote from: Joe
[23:55:31] [william@enterprise ~/Documents/Programming/javaop2]$ svn commit -m 'Tried to fix StayConnected. Again.'
Committed revision 63.
StayConnected strikes back!