code: protected static final int calcPadding (final int len) {
  
          if (len < 0) { throw new IllegalArgumentException("Length must be a positive number"); }
  
          final int rest = len % Constants.BYTES_PER_INT;
          if (rest > 0) {
              return Constants.BYTES_PER_INT - rest;
          } else {
              return 0;
          }
      }
docs: This methods calculates the number of padding bytes of the given length. This number of the padding bytes is in
  the range of <code>0, ..., BYTES_PER_INT</code>.
  
  @param len The length for which the padding bytes are calculated.
  @return The number of padding bytes.