/** * Wrap a given buffer beginning at an offset. * * @param buffer to wrap * @param offset at which the puts will occur. */ public void wrap(final MutableDirectBuffer buffer, final int offset) { Objects.requireNonNull(buffer, "Buffer must not be null"); if (!buffer.isExpandable()) { throw new IllegalStateException("buffer must be expandable."); } this.buffer = buffer; this.offset = offset; this.position = 0; }
if (length > capacity && !scratchBuffer.isExpandable())
/** * Wrap a given buffer beginning at an offset. * * @param buffer to wrap * @param offset at which the puts will occur. */ public void wrap(final MutableDirectBuffer buffer, final int offset) { Objects.requireNonNull(buffer, "Buffer must not be null"); if (!buffer.isExpandable()) { throw new IllegalStateException("buffer must be expandable."); } this.buffer = buffer; this.offset = offset; this.position = 0; }
/** * Wrap a given buffer beginning at an offset. * * @param buffer to wrap * @param offset at which the puts will occur. */ public void wrap(final MutableDirectBuffer buffer, final int offset) { Objects.requireNonNull(buffer, "Buffer must not be null"); if (!buffer.isExpandable()) { throw new IllegalStateException("buffer must be expandable."); } this.buffer = buffer; this.offset = offset; this.position = 0; }
if (length > capacity && !scratchBuffer.isExpandable())