Package io.camunda.zeebe.util.buffer
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 TypeMethodDescriptiondefault voidcopyFrom(BufferWriter source) Copies the contents ofsourceinto a newly allocated buffer before reading it back.voidwrap(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 fromoffset- the offset at which to start readinglength- the length of the values to read
-
copyFrom
Copies the contents ofsourceinto a newly allocated buffer before reading it back.- Parameters:
source- the source writer- Throws:
NullPointerException- if source is null
-