On 21 Sty, 18:56, rahul verma <[email protected]> wrote:
>  well well well .... After trying to search for an answer online,
> wasting hours trying myself and finally slamming my head on a wall i
> found the reason of error
>
> replacing in.read(data, 0, 1024) by in.read(data) , the downloaded apk
> now installs normally ... fewwwwwww.....

i believe you had to cheange something else in your code since
in.read(data, 0, 1024) and in.read(data)
are the same thing when data = new byte[1024]

see FilterInputStream.java which is the base class for
BufferedInputStream

here you will see:

@Override
public int read(byte[] buffer) throws IOException {
        return read(buffer, 0, buffer.length);
}

so when you are calling in.read(data) you are actually calling
in.read(data, 0, data.length)

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to