ByteBufferExtractor

  • ByteBufferExtractor is a utility class for extracting a ByteBuffer from an MlImage.

  • It currently only supports MlImage with STORAGE_TYPE_BYTEBUFFER.

  • The static extract method is used to perform the extraction.

  • The extracted ByteBuffer is a read-only view.

  • An IllegalArgumentException is thrown if the MlImage does not contain a ByteBuffer storage.

public class ByteBufferExtractor extends Object

Utility for extracting ByteBuffer from MlImage.

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

Public Method Summary

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

Inherited Method Summary

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.

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