## ByteBuffer.array() does not have a binding

_Submitted by a community member on 2014-06-20 18:40 UTC_

As several people on the forums have pointed out, ByteBuffer.array() does not have a binding (and improperly using Object.ToArray\<byte\>() doesn't work either). E.g. <http://forums.xamarin.com/discussion/5950/how-to-convert-from-bitmap-to-byte-without-bitmap-compress> I provided the code in that forum post for calling JNI directly to avoid the crazy workarounds others have posted (such as writing it out to a file and reading it back in), but it's a problem that it's missing from the default Xamarin bindings.

Xamarin.Android   4.12.5.2 (419335316003113183185da56b888fffe0875ae2)

Thanks! :)

* * *

_Reference: <https://bugzilla.xamarin.com/show_bug.cgi?id=20772>_