What you should do is create getter methods for the information you want. First of all you should have the variables that you need to access stored privately in the class, and then assign the values to them, and then you should have helper methods which return that data.
So you could do something like:
private String userName;
and then assign it to the right location, and to access it:
public String getName()
{
return userName;
}