Are you having problem finding the starting index of the actual password string? Use a combination of lastIndexOf and length, e.g.
String password = "Password:";
int theStartIndexOfPassword = read.lastIndexOf(password) + password.length;
Modify it to take into account any white space.