Marshal/unmarshal built-in primitive types to and from a {@link ByteBuffer}.
The following list of type marshaling is supported:
- byte <-> TYPE_BYTE
- int <-> TYPE_INT32
- long <-> TYPE_INT64
- float <-> TYPE_FLOAT
- double <-> TYPE_DOUBLE
- Rational <-> TYPE_RATIONAL
Due to the nature of generics, values are always boxed; this also means that both
the boxed and unboxed types are supported (i.e. both {@code int} and {@code Integer}).
Each managed type must correspond 1:1 to the native type
(e.g. a byte will not map to a {@link CameraMetadataNative#TYPE_INT32 TYPE_INT32} or vice versa)
for marshaling. |