Interface Data.ByteArrayView

All Superinterfaces:
Supplier<byte[]>
All Known Subinterfaces:
JacksonInverter.DocumentBytes
Enclosing class:
Data<T>

public static interface Data.ByteArrayView extends Supplier<byte[]>
Read-only view of a byte-array range for serializers that can consume a slice directly.

The backing array must not be modified. Calling Supplier.get() retains the ordinary byte[] contract and may materialize an independent array.

  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    Returns the backing byte array without copying it.
    int
    Returns the number of bytes covered by this view.
    int
    Returns the zero-based offset where this view starts in the backing array.

    Methods inherited from interface Supplier

    get
  • Method Details

    • array

      byte[] array()
      Returns the backing byte array without copying it.
    • offset

      int offset()
      Returns the zero-based offset where this view starts in the backing array.
    • length

      int length()
      Returns the number of bytes covered by this view.