Has anyone an idea how to get a BufferedInputStream to a byte[] so that I can make a Bitmap of it?
That's my Stream:
BufferedInputStream stream = new BufferedInputStream(socket.getInputStream());
And that's my byte[]:
byte[] bytes;
uhm... the read()
method of the BufferedInputStream
will give you the byte[]
you need.
For getting a Bitmap
, use the BitmapFactory.decodeStream()
method and pass in your BufferedInputStream
as a parameter. Good to go ! :)