I have 3 lines of code in C#, which I don't understand. I want to know the equivalent in Java/Android:
// Get the address of the first line.
// Declare an array to hold the bytes of the bitmap.
int bytes = Math.Abs(bmpData.Stride) * bmp_sized_in.Height;
byte[] rgbValues = new byte[bytes];
// I DON'T UNDERSTAND WHAT THESE 3 LINES DO
// WHAT IS THE TYPE OF IntPtr and WHAT DOES Scan0 DO?
IntPtr ptr = bmpData.Scan0;
System.Runtime.InteropServices.Marshal.Copy(ptr, rgbValues, 0, bytes);
System.Runtime.InteropServices.Marshal.Copy(rgbValues, 0, ptr, bytes);
bmpData is of type BitMapData
Can somebody explain these 3 lines to me, so that I can translate them to Java for Android?