ByteBufferExtractor

public class ByteBufferExtractor

Utility for extracting ByteBuffer from MlImage.

Currently it only supports MlImage with MlImage.STORAGE_TYPE_BYTEBUFFER, otherwise IllegalArgumentException will be thrown.

Public Methods

static ByteBuffer
extract(MlImage image)
Extracts a ByteBuffer from an MlImage.

Inherited Methods

boolean
equals(Object arg0)
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()

Public Methods

public static ByteBuffer extract (MlImage image)

Extracts a ByteBuffer from an MlImage.

The returned ByteBuffer is a read-only view, with the first available ImageProperties whose storage type is MlImage.STORAGE_TYPE_BYTEBUFFER.

Parameters
image
Returns
Throws
IllegalArgumentException when the image doesn't contain a ByteBuffer storage.