code: public void update(ByteBuffer buffer) {
      length += buffer.remaining();
      //Save current position to leave given buffer unchanged
      int position = buffer.position();
      
      //Complete the final buffer if needed
      completeFinalBuffer(buffer);
      
      while(buffer.remaining() >= 64) {
        transform(buffer);
      }
      
      if(buffer.remaining() != 0) {
        finalBuffer.put(buffer);
      }
      
      buffer.position(position);
    }
docs: Starts or continues a SHA-1 message digest calculation.
  Only the remaining bytes of the given ByteBuffer are used.
  @param buffer input data