Given an java.security.interfaces.RSAKey, how do I get it's size?
You could try this:
key.getModulus().bitLength();
The size of an RSA key is the number of bits in its modulus, so you want myRSAKey.getModulus().bitLength().
myRSAKey.getModulus().bitLength()