Set the positions of the buffers to the start of the content, leaving some room for the headers.
761148
private void prepareBuffers(List<DBBPool.BBContainer> buffers)
    {
        Preconditions.checkArgument(buffers.size() == m_tableTasks.size());

        UnmodifiableIterator<SnapshotTableTask> iterator = m_tableTasks.iterator();
        for (DBBPool.BBContainer container : buffers) {
            int headerSize = iterator.next().m_target.getHeaderSize();
            final ByteBuffer buf = container.b();
            buf.clear();
            buf.position(headerSize);
        }
    }
1238106
private void moveElements(int i)
    {
        if (i >= size)
            return;

        System.arraycopy(starts, i, starts, i+1, size - i);
        System.arraycopy(ends, i, ends, i+1, size - i);
        System.arraycopy(markedAts, i, markedAts, i+1, size - i);
        System.arraycopy(delTimes, i, delTimes, i+1, size - i);
        // we set starts[i] to null to indicate the position is now empty, so that we update boundaryHeapSize
        // when we set it
        starts[i] = null;
    }
425617
protected void beforeStartElement() {
        beforeMarkup();
        if (stack.length <= depth + 1) {
            // Allocate more space for the stack:
            int[] newStack = new int[stack.length * 2];
            System.arraycopy(stack, 0, newStack, 0, stack.length);
            stack = newStack;
        }
        stack[depth + 1] = 0; // nothing written yet
    }
350292
public void init(Object data, int iFieldsTypes)
    {
        if (data == null)
            this.clearBuffer();
        else
        {
            m_iHeaderCount = 0;
            this.setPhysicalData(data);
            this.resetPosition();
        }
        m_iFieldsTypes = iFieldsTypes;      // Default - assume all fields (call bufferToFields(xxx, false) if not)
    }
954137
protected function fixHeaders()
    {
        parent::fixHeaders();
        if (count($this->getChildren())) {
            $this->setHeaderParameter('Content-Type', 'charset', null);
            $this->setHeaderParameter('Content-Type', 'format', null);
            $this->setHeaderParameter('Content-Type', 'delsp', null);
        } else {
            $this->setCharset($this->userCharset);
            $this->setFormat($this->userFormat);
            $this->setDelSp($this->userDelSp);
        }
    }
271432
private void setPosition() {
		switch (getAlignment()) {
			case LEFT:
				canvas.setLeft(getHorizontalOffset());
				break;
			case RIGHT:
				canvas.setLeft(mapWidget.getVectorContext().getWidth() - getWidth() - getHorizontalOffset());
				break;
		}
		switch (getVerticalAlignment()) {
			case TOP:
				canvas.setTop(getVerticalOffset());
				break;
			case BOTTOM:
				canvas.setTop(mapWidget.getVectorContext().getHeight() - getHeight() - getVerticalOffset());
				break;
		}
	}
758481
private void flush(boolean isEnd)
  {
    if (_startOffset == _offset && _bufferSize == 0) {
      if (! isCommitted() || isEnd) {
        flush(null, isEnd);
        _startOffset = bufferStart();
        _offset = _startOffset;
      }
      return;
    }

    int sublen = _offset - _startOffset;
    _tBuf.length(_offset);
    _contentLength += _offset - _startOffset;
    _bufferSize = 0;
    
    if (_startOffset > 0) {
      fillChunkHeader(_tBuf, sublen);
    }
    
    flush(_tBuf, isEnd);

    if (! isEnd) {
      _tBuf = TempBuffer.create();
    
      _startOffset = bufferStart();
      _offset = _startOffset;

      _tBuf.length(_offset);
      
      _buffer = _tBuf.buffer();
    }
    else {
      _tBuf = null;
    }
  }
218994
public void init(TempCharBuffer head)
  {
    _top = head;
    _head = head;

    if (head != null) {
      _buffer = head.buffer();
      _length = head.getLength();
    }
    else
      _length = 0;

    _offset = 0;
  }
466534
def adjustHeadingPointer(self):
        ''''''
        self.headingText.set_text(str(self.heading))
        self.headingText.set_size(self.fontSize)
665679
void setHeaders(Map<String, String> headers) {
    this.headers = Collections.unmodifiableMap(new HashMap<>(headers));
  }
605440
private void resizeHeaders()
  {
    CharBuffer []newKeys = new CharBuffer[_headerSize * 2];
    CharBuffer []newValues = new CharBuffer[_headerSize * 2];

    for (int i = 0; i < _headerSize; i++) {
      newKeys[i] = _headerKeys[i];
      newValues[i] = _headerValues[i];
    }

    for (int i = _headerSize; i < newKeys.length; i++) {
      newKeys[i] = new CharBuffer();
      newValues[i] = new CharBuffer();
    }

    _headerKeys = newKeys;
    _headerValues = newValues;
  }
1315
def set_buffer_limits(self, high=None, low=None):
        """"""
        if high is None:
            high = self.default_buffer_size
        if low is None:
            low = high // 2
        self._buffer_high = high
        self._buffer_low = low
632999
def set_scrollbar_position(self, position):
        """"""
        # Scrollbars will be restored after the expanded state
        self._scrollbar_positions = position
        if self._to_be_loaded is not None and len(self._to_be_loaded) == 0:
            self.restore_scrollbar_positions()
861082
public void setTableOfContents(Placement placement) {
        this.attributes.put(TOC, toAsciidoctorFlag(true));
        this.attributes.put(TOC_POSITION, placement.getPosition());
    }
1222964
protected void setLayoutToStartSegment(int segmentLength,
                                          int priority,
                                          boolean isPooled,
                                          boolean isExchange,
                                          int packetNumber,
                                          int segmentType,
                                          int conversationId,
                                          int requestNumber,
                                          long totalLength)
   {
      if (tc.isEntryEnabled()) SibTr.entry(this, tc, "setLayoutToStartSegment", new Object[]{""+segmentLength, ""+priority, ""+isPooled, ""+isExchange, ""+packetNumber, ""+segmentType, ""+conversationId, ""+requestNumber, ""+totalLength});
      setLayoutToConversation(segmentLength, priority, isPooled, isExchange, packetNumber, segmentType, conversationId, requestNumber, null, null);
      segmentedTransmissionHeaderFields.totalLength = totalLength;
      segmentedTransmissionHeaderFields.segmentType = segmentType;
      transmissionRemaining = segmentLength;
      primaryHeaderFields.segmentType = JFapChannelConstants.SEGMENT_SEGMENTED_FLOW_START;      
      layout = JFapChannelConstants.XMIT_SEGMENT_START;
      if (tc.isEntryEnabled()) SibTr.exit(this, tc, "setLayoutToStartSegment");
   }
1189709
protected function setStartValues()
    {
        $this->result->setStartTime(microtime(true));
        $this->result->setStartMemory(memory_get_usage());
    }
1269273
function setBuffer(newSize) {
		// Add 1 byte of padding to the buffer to make the overall implementation easier
		var oldLength = self.length;
		var newBuffer = new Buffer(newSize + 1);
		newBuffer.fill(0);
		if (buffer instanceof Buffer) self.copy(newBuffer);
		buffer = newBuffer;
		head = 0;
		tail = oldLength || 0;
	}