code: public final int setDataBuffer (final ByteBuffer src, final int off, final int len) {
  
          resizeBuffer(len, false);
          src.position(off);
  
          int n = 0;
          while (src.hasRemaining() && n++ < length) {
              dataBuffer.put(src.get());
          }
  
          dataBuffer.rewind();
  
          return n;
      }
docs: {@inheritDoc}