What is the use of ByteBuffer in Java? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so … Read more
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so … Read more
Bitmap bmp = intent.getExtras().get(“data”); int size = bmp.getRowBytes() * bmp.getHeight(); ByteBuffer b = ByteBuffer.allocate(size); bmp.copyPixelsToBuffer(b); byte[] bytes = new byte[size]; try { b.get(bytes, … Read more