code: private final void transferBytes (final ByteBuffer src, final ByteBuffer dst, final int len) {
  
          if (dst.remaining() < len) { throw new IllegalArgumentException("The given length must be less or equal than the remaining bytes in the destination buffer."); }
          for (int i = 0; i < len; i++) {
              if (src.hasRemaining() && dst.hasRemaining()) {
                  dst.put(src.get());
              } else {
                  throw new RuntimeException("Error by transferring the bytes in this data segment.");
              }
          }
      }
docs: --------------------------------------------------------------------------