Interface BufferReader


public interface BufferReader
Implementations may expose methods for access to properties from the buffer that is read. The reader is a view on the buffer Any concurrent changes to the underlying buffer become immediately visible to the reader.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Copies the contents of source into a newly allocated buffer before reading it back.
    void
    wrap(org.agrona.DirectBuffer buffer, int offset, int length)
    Wraps a buffer for read access.
  • Method Details

    • wrap

      void wrap(org.agrona.DirectBuffer buffer, int offset, int length)
      Wraps a buffer for read access.
      Parameters:
      buffer - the buffer to read from
      offset - the offset at which to start reading
      length - the length of the values to read
    • copyFrom

      default void copyFrom(BufferWriter source)
      Copies the contents of source into a newly allocated buffer before reading it back.
      Parameters:
      source - the source writer
      Throws:
      NullPointerException - if source is null