Bitmap.setPixels throws an exception if the parameter type doesn't match.
Bitmap.getPixels() can now return a mem view or a copy depending on a second parameter.
Docs for enhanced Bitmap.getPixels()