code: protected void sync(AbstractByteArrayBufferBuffer master) {
  
      this.buffersEndIndex = master.buffersEndIndex;
      int bufferDist = master.bufferStepCount - this.bufferStepCount;
      if (bufferDist > 0) {
        this.buffersIndex = master.buffersIndex;
        this.bufferStepCount = master.bufferStepCount;
        ByteArrayBuffer buffer = this.buffers[this.buffersIndex];
        this.currentBufferBytes = buffer.getBytes();
        this.currentBufferIndex = buffer.getCurrentIndex();
        this.currentBufferMax = buffer.getMaximumIndex();
      }
    }
docs: This method synchronizes the buffer with the given {@code master}.
  
  @param master is the buffer this buffer was created from.