AndroidImage.Plane


public final class AndroidImage.Plane implements ImagePlane


A Plane backed by an ImagePlane.

Summary

Public constructors

Plane(@NonNull Image.Plane imagePlane)

Public methods

@NonNull ByteBuffer
int
int
T
<T extends Object> unwrapAs(@NonNull Class<@NonNull T> type)

Attempt to unwrap this object into an underlying type.

Public constructors

Plane

Added in 1.7.0-alpha02
public Plane(@NonNull Image.Plane imagePlane)

Public methods

getBuffer

public @NonNull ByteBuffer getBuffer()
See also
getBuffer

getPixelStride

public int getPixelStride()
See also
getPixelStride

getRowStride

public int getRowStride()
See also
getRowStride

unwrapAs

public T <T extends Object> unwrapAs(@NonNull Class<@NonNull T> type)

Attempt to unwrap this object into an underlying type.

This operation is not safe and should be used with caution as it makes no guarantees about the state of the underlying objects. In particular, implementations should assume that fakes, test wrappers will always return null. Finally this method should return null when unwrapping into the provided type is not supported.

Returns
T

unwrapped object matching T or null