Sets the source buffer.  Equivalent to unqueueing all buffers, then queuing the provided
buffer.  Cannot be called when the source is playing or paused.

@param buffer the buffer to set, or <code>null</code> to clear.
556579
public void setBuffer (Buffer buffer)
    {
        _queue.clear();
        if (buffer != null) {
            _queue.add(buffer);
        }
        AL10.alSourcei(_id, AL10.AL_BUFFER, buffer == null ? AL10.AL_NONE : buffer.getId());
    }
1145319
public static void clearToFill(ByteBuffer buffer) {
        if (buffer != null) {
            buffer.position(0);
            buffer.limit(buffer.capacity());
        }
    }
69561
public void update(byte buffer) {
        if (skip) return;

        for (int i=0; i < digests.size(); i++) {
            digests.get(i).update(buffer);
        }
    }
562129
public void put(byte[] source)
    {
        // If the buffer is small.
        if (mBuffer.capacity() < (mLength + source.length))
        {
            expandBuffer(mLength + source.length + ADDITIONAL_BUFFER_SIZE);
        }

        mBuffer.put(source);
        mLength += source.length;
    }
1215504
public void handle(Buffer buffer) {
        if (buff == null) {
            buff = buffer;
        } else {
            buff.appendBuffer(buffer);
        }

        if(recordSize == -1) {
            fixedSizeMode(buff.getInt(0) + 4);
        }

        handleParsing();
    }
923418
private void flushBuffer(boolean close) {
    for (HttpImageUploadChannel ch : uploadChannels) {
      ch.send(buffer);
    }
    if (!close) {
      // allocate new buffer, since the old one is used by the channels for
      // reading
      buffer = new ByteArrayOutputStream((int) (1.2 * flushSize));
    }
  }
1322123
public final void setListener( @Nullable final WebSocketListener listener )
  {
    _listener = null == listener ? NullWebSocketListener.LISTENER : listener;
  }
33800
public void append(StringBuilder buffer, Object value) {
        if (buffer == null) {
            throw new NullPointerException("buffer");
        }

        buffer.append(value);
    }
892948
private void setSource(String source) {
        requireArgument(source != null && !source.trim().isEmpty(), "Source cannot be null or empty.");
        _source = source;
    }
446947
public void setBuffer(final String buffer) {
        initRandomBuffer();
        byteBufferAry = Arrays.copyOf(buffer.getBytes(), MAX_PACKETBUFFER_LENGTH);
    }
28218
public void read(ByteBuffer buffer) {
        Persistables.persistable(streamableNoBuffers()).read(buffer);

        final int n = getNumDataBuffers();
        int lengthsPosition = buffer.position();
        buffer.position(buffer.position() + 2 * n); // skip positions
        for (int i = 0; i < n; i++) {
            final int size = buffer.getShort(lengthsPosition) & 0xFFFF; // big-endian
            lengthsPosition += 2;

            final ByteBuffer b1 = Persistables.slice(buffer, size);
            setDataBuffer(i, b1);
        }
    }
1258518
public synchronized void write(ByteBuffer buffer)
     {
         if (buffer.hasRemaining())
         {
             _buffers=LazyList.add(_buffers,buffer); 
            this.notify();
         }
         else
             recycle(buffer);
     }
972341
public void setBS(java.util.Collection<java.nio.ByteBuffer> bS) {
        if (bS == null) {
            this.bS = null;
            return;
        }

        this.bS = new java.util.ArrayList<java.nio.ByteBuffer>(bS);
    }
313264
public final void freeBuffers()
    {
        if (_bufferHolder != null) {
            byte[] buf = _inputBuffer;
            if (buf != null) {
                _inputBuffer = null;
                _bufferHolder[0] = buf;
            }
        }
    }
1223999
static public void dispose (ByteBuffer buffer) {
		if (!(buffer instanceof DirectBuffer)) return;
		if (cleanerMethod != null) {
			try {
				cleanMethod.invoke(cleanerMethod.invoke(buffer));
			} catch (Throwable ignored) {
			}
		}
	}
455527
@Override
    public void setBufferConfig(int bufferSize, boolean autoFlush) throws IOException {
	this.bufferSize = bufferSize;
	this.autoFlush = autoFlush;
	_check();
    }
1303622
public void flushBuffer()
  {
    Writer out = this.out;
    if (out == null)
      return;

    try {
      if (out instanceof FlushBuffer)
        ((FlushBuffer) out).flushBuffer();
    } catch (IOException e) {
      log.log(Level.FINE, e.toString(), e);
    }
  }