[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kvm-interest
Subject:    Re: IndexOutOfBoundsException
From:       "Darryl L. Pierce" <mcpierce () DATABASIX ! COM>
Date:       2002-04-28 12:04:11
[Download RAW message or body]

On Fri, Apr 26, 2002 at 05:15:12PM -0700, Sheik Nazeer wrote:
> its giving exception in din.readfully();
> bb is a byte array,
> its size is always 2000,
> it is initialized only once in the begining,
> bb = new byte[2000];
> the length(len) varies from 1 to 2000, depends on remaining bytes,

Before the call to readFully(), put:

System.out.println("len=" + len);

and check to make sure that len is _always_ within bounds of the byte
array.

-- 
Darryl L. Pierce <mcpierce@databasix.com>
Visit the Infobahn Offramp @ <http://welcome.to/mcpierce>
"What do you care what other people think, Mr. Feynman?"

 =========================================================================To \
unsubscribe, send email to listserv@java.sun.com and include in the body of the \
message "signoff KVM-INTEREST".  For general help, send email to \
listserv@java.sun.com and include in the body of the message "help".


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic