code: @Nonnegative
    public static int transfer (@Nonnull final ByteBuffer aSrcBuffer,
                                @Nonnull final ByteBuffer aDstBuffer,
                                final boolean bNeedsFlip)
    {
      ValueEnforcer.notNull (aSrcBuffer, "SourceBuffer");
      ValueEnforcer.notNull (aDstBuffer, "DestinationBuffer");
  
      int nRead = 0;
      if (bNeedsFlip)
      {
        if (aSrcBuffer.position () > 0)
        {
          aSrcBuffer.flip ();
          nRead = _doTransfer (aSrcBuffer, aDstBuffer);
          if (aSrcBuffer.hasRemaining ())
            aSrcBuffer.compact ();
          else
            aSrcBuffer.clear ();
        }
      }
      else
      {
        if (aSrcBuffer.hasRemaining ())
          nRead = _doTransfer (aSrcBuffer, aDstBuffer);
      }
      return nRead;
    }
docs: Transfer as much as possible from source to dest buffer.
  
  @param aSrcBuffer
  Source buffer. May not be <code>null</code>.
  @param aDstBuffer
  Destination buffer. May not be <code>null</code>.
  @param bNeedsFlip
  whether or not to flip src
  @return The amount of data transferred. Always &ge; 0.