public int calculatePaddingLength(int dataLength){
  return encryptCipher.getBlockSize() - (dataLength % encryptCipher.getBlockSize());
}

public int calculatePaddingLength ( int dataLength ) { return encryptCipher . getBlockSize ( ) - ( dataLength % encryptCipher . getBlockSize ( ) ) ; }
calculates padding length for a given datalength and the initialized block cipher
