SecureRandom random = new SecureRandom(); // quite heavy, look into a lighter method.
String stringToEncrypt = \"mypassword\";
byte[] realiv = new byte[16];
random.
I strongly suspect that what you want to do is call ecipher.doFinal(stringToEncrypt), possibly after a series of doUpdate(...) if you have longer strings.
.init() creates the cipher object, update() and doFinal() populate the encrypted output and take the plaintext as input.
Of course, you'll need to convert between String and a byte array.