Set the internal buffer to this instance or if the
{@link #caller()} exists, to the caller instance

@param buffer
170463
public void __setBuffer(StringBuilder buffer) {
        if (null != __caller) ((TextBuilder) __caller).__setBuffer(buffer);
        else __buffer = buffer;
    }
308781
public function Set( $Buffer )
		{
			$this->Buffer   = $Buffer;
			$this->Length   = StrLen( $Buffer );
			$this->Position = 0;
		}
958730
@Override
    public void recollect(W buffer) {
        if (queue.size() < preservedBufs) {
            long effectiveDrainDelay
                = drainDelay > 0 ? drainDelay : defaultDrainDelay;
            if (effectiveDrainDelay > 0) {
                // Enqueue
                buffer.clear();
                queue.add(buffer);
                Timer old = idleTimer.getAndSet(Components.schedule(this::drain,
                    Duration.ofMillis(effectiveDrainDelay)));
                if (old != null) {
                    old.cancel();
                }
                return;
            }
        }
        // Discard
        removeBuffer(buffer);
    }
971417
public void resetWithShared(char[] buf, int start, int len)
    {
        // Let's first mark things we need about input buffer
        mInputBuffer = buf;
        mInputStart = start;
        mInputLen = len;

        // Then clear intermediate values, if any:
        mResultString = null;
        mResultArray = null;

        // And then reset internal input buffers, if necessary:
        if (mHasSegments) {
            clearSegments();
        }
    }
145118
public void setData(ByteBuffer buffer) {
        buffer.rewind();
        this.buffer = CausticUtil.createByteBuffer(buffer.capacity());
        this.buffer.put(buffer);
    }
252381
@Override
    public void setDirectShadowBuffer(ByteBuffer buffer) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "setDirectShadowBuffer(ByteBuffer)");
        }
        convertBufferIfNeeded();
        super.setDirectShadowBuffer(buffer);
    }
988661
public void sendBuffer(Buffer buffer) throws IOException, InterruptedException {
		checkStatus();

		// discard empty buffers
		if (buffer.size() == 0) {
			return;
		}

		Envelope envelope = createNextEnvelope();
		envelope.setBuffer(buffer);
		this.envelopeDispatcher.dispatchFromOutputChannel(envelope);
	}
1037600
public static Buffer wrapAndClone(final byte[] buffer) {
        if (buffer == null || buffer.length == 0) {
            throw new IllegalArgumentException("the buffer cannot be null or empty");
        }

        final byte[] b = new byte[buffer.length];
        System.arraycopy(buffer, 0, b, 0, buffer.length);
        return new ByteBuffer(b);
    }
69561
public void update(byte buffer) {
        if (skip) return;

        for (int i=0; i < digests.size(); i++) {
            digests.get(i).update(buffer);
        }
    }
1356847
public void update(ByteBuffer buffer) {
    length += buffer.remaining();
    //Save current position to leave given buffer unchanged
    int position = buffer.position();
    
    //Complete the final buffer if needed
    completeFinalBuffer(buffer);
    
    while(buffer.remaining() >= 64) {
      transform(buffer);
    }
    
    if(buffer.remaining() != 0) {
      finalBuffer.put(buffer);
    }
    
    buffer.position(position);
  }
425627
@Override
    public void setBufferSize(int size) {
        if (this.writing || isClosed()) {
            throw new IllegalStateException("Stream unable to set size");
        }
        this.amountToBuffer = size;
        this.bbSize = (49152 < size) ? 32768 : 8192;

        // make sure we never create larger frames than the max http2 frame size
        Integer h2size = (Integer) this.getVc().getStateMap().get("h2_frame_size");
        if (h2size != null && h2size < bbSize) {
            this.bbSize = h2size;
        }

        int numBuffers = (size / this.bbSize);
        if (0 == size || 0 != (size % this.bbSize)) {
            numBuffers++;
        }
        this.output = new WsByteBuffer[numBuffers];
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "setBufferSize=" + size + "; " + this);
        }
    }
1021630
void initNewBuffer(Writer out, int bufSize)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        { // 306998.15
            Tr.debug(tc, "initNewBuffer, size --> " + bufSize + " this --> " + this);
        }
        this.out = out;
        this.except = null;
        bufferSize = bufSize;
        buf = new char[bufferSize];
    }
66345
public static void unmap(final MappedByteBuffer buffer)
    {
        if (null != buffer)
        {
            try
            {
                MappingMethods.UNMAP_BUFFER.invoke(null, buffer);
            }
            catch (final Exception ex)
            {
                LangUtil.rethrowUnchecked(ex);
            }
        }
    }
469824
public final void setElevation(StringBuilder contentBuffer) {
        ptValues[GpxMetadata.PTELE] = Double.parseDouble(contentBuffer.toString());
    }
755365
private boolean internalRead(Buffer buffer)
    {
        try
        {
            return !(buffer.readFrom(transport) < 0);
        }
        catch (IOException e)
        {
            logger.warn("Got an IOException in internalRead!", e);
            return false;
        }
    }
92788
public static LinkedBuffer use(byte[] buffer, int start)
    {
        assert start >= 0;
        if (buffer.length - start < MIN_BUFFER_SIZE)
            throw new IllegalArgumentException(MIN_BUFFER_SIZE + " is the minimum buffer size.");

        return new LinkedBuffer(buffer, start, start);
    }
1258518
public synchronized void write(ByteBuffer buffer)
     {
         if (buffer.hasRemaining())
         {
             _buffers=LazyList.add(_buffers,buffer); 
            this.notify();
         }
         else
             recycle(buffer);
     }