mapTo

inline fun <R, C : MutableCollection<in R>> ByteBuffer.mapTo(destination: C, transform: (Byte) -> R): C
inline fun <R, C : MutableCollection<in R>> ShortBuffer.mapTo(destination: C, transform: (Short) -> R): C
inline fun <R, C : MutableCollection<in R>> IntBuffer.mapTo(destination: C, transform: (Int) -> R): C
inline fun <R, C : MutableCollection<in R>> LongBuffer.mapTo(destination: C, transform: (Long) -> R): C
inline fun <R, C : MutableCollection<in R>> FloatBuffer.mapTo(destination: C, transform: (Float) -> R): C
inline fun <R, C : MutableCollection<in R>> DoubleBuffer.mapTo(destination: C, transform: (Double) -> R): C
inline fun <R, C : MutableCollection<in R>> CharBuffer.mapTo(destination: C, transform: (Char) -> R): C

Applies the given transform function to each element of the original buffer and appends the results to the given destination.