humble-video-noarch/src/main/java/io/humble/ferry/Buffer.java
public void put(byte[] src, int srcPos, int destPos, int length)
  {
    java.util.concurrent.atomic.AtomicReference<JNIReference> ref =
      new java.util.concurrent.atomic.AtomicReference<JNIReference>();
    java.nio.ByteBuffer buffer = this.getByteBuffer(0, this.getBufferSize(),
        ref);
    
    try
    {
      if (buffer == null)
        return;
      buffer.clear();
      validateArgs(src, src.length, srcPos, buffer.limit(), destPos, length);
      
      buffer.position(destPos);
      buffer.put(src, srcPos, length);
      return;
    }
    finally
    {
      if (ref.get() != null)
        ref.get().delete();
    }
  }
public void put(byte[] src, int srcPos, int destPos, int length)
  {
    java.util.concurrent.atomic.AtomicReference<JNIReference> ref =
      new java.util.concurrent.atomic.AtomicReference<JNIReference>();
    java.nio.ByteBuffer buffer = this.getByteBuffer(0, this.getBufferSize(),
        ref);
    
    try
    {
      if (buffer == null)
        return;
      buffer.clear();
      validateArgs(src, src.length, srcPos, buffer.limit(), destPos, length);
      
      buffer.position(destPos);
      buffer.put(src, srcPos, length);
      return;
    }
    finally
    {
      if (ref.get() != null)
        ref.get().delete();
    }
  }
Absolute bulk put method.
<p>
This method transfers bytes into this buffer from the given source array.
If there are more bytes to be copied from the array than there is
space remaining at the specified destination offset,
then no bytes are transferred and a java.nio.BufferOverflowException is thrown.
</p>
<p>
This method is equivalent to calling {@link #getByteBuffer(int, int)}
yourself and copying the bytes over, but is more efficient in
the {@link JNIMemoryManager.MemoryModel#NATIVE_BUFFERS} memory model.
</p>

@param src The array from which bytes are to be read.  Must be non null.
@param srcPos The offset within <code>src</code> of the first byte to be read;
must be non-negative and less than <code>src.length</code>
@param destPos The offset in the Buffer where you want to copy
data to.  Must be non-negative and less than <code>getBufferSize()</code>
@param length The number of bytes to be read from <code>src</code>;
must be non-negative and no larger than <code>src.length - srcPos</code>

@throws NullPointerException if <code>src</code> is null.
@throws IndexOutOfBoundsException if the preconditions on the arguments
mentioned above are not honored.
@throws java.nio.BufferOverflowException if there is insufficient space
in this {@link Buffer}.