converting byte to Byte or int
From: Madhur Ahuja (ef_at_df.com)
Date: 08/28/04
- Previous message: Madhur Ahuja: "disabling maximize button of JFrame"
- Next in thread: Tor Iver Wilhelmsen: "Re: converting byte to Byte or int"
- Reply: Tor Iver Wilhelmsen: "Re: converting byte to Byte or int"
- Reply: Oscar kind: "Re: converting byte to Byte or int"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 29 Aug 2004 00:25:21 +0530
Hello
Consider the code below:
private byte [] rawipstart,rawipstop;
rawipstart=start.getAddress();
rawipstop=stop.getAddress();
System.out.println(rawipstart[0]);
String host=null;
int i=0;
Byte rawipst,rawipsp;
rawipst=(Byte)rawipstart[3]; file://error
rawipsp=rawipstop[3]; file://error
while(rawipstart[3]<=rawipstop[3])
{
System.out.println(rawipstart[3] + "" +rawipstop[3]);
In code above, How can I convert a byte to a Byte, so that I can
loop the code greater than 127 times. Both attempts to convert, with
and without casting produced errors.
-- Winners dont do different things, they do things differently. Madhur Ahuja India Homepage : http://madhur.netfirms.com Email : madhur<underscore>ahuja<at>yahoo<dot>com
- Previous message: Madhur Ahuja: "disabling maximize button of JFrame"
- Next in thread: Tor Iver Wilhelmsen: "Re: converting byte to Byte or int"
- Reply: Tor Iver Wilhelmsen: "Re: converting byte to Byte or int"
- Reply: Oscar kind: "Re: converting byte to Byte or int"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]