Re: Re: Re: Re: Re: ArrayIndexOutOfBounds when read class

Tatu Saloranta <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
On Sun, Aug 22, 2010 at 11:08 AM, Ping Mao <[email protected]> wrote:
> Hi Eugene,
>
> Thanks for replying. But I don't understand how come it is incomplete byte
> array, or how I can avoid incomplete byte array. I see the same issue on the

I think implication was that code that is reading bytes from a file
(or such) is not actually reading the whole class file.
This can commonly occur if assumption is that a single read always
reads all data available. Like if class file is 32 kB, but code just
reads 4k of it (note: InputStream.read() is not even guaranteed to
read anything more than a single byte).
This happens most commonly when reading data over network, using URL
to construct InputStream.

-+ Tatu +-
message-footer.txt (text/plain, 238 B)
-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.