Interface VCustomSource.ReadCallback

Enclosing class:
VCustomSource
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface VCustomSource.ReadCallback
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    read(MemorySegment dataPointer, long length)
    Read data from the input and write it to the provided memory segment
  • Method Details

    • read

      long read(MemorySegment dataPointer, long length)
      Read data from the input and write it to the provided memory segment
      Parameters:
      dataPointer - Pointer to the memory segment where the data should be written
      length - The maximum number of bytes to read
      Returns:
      The number of bytes actually read, or -1 on error