static Profile decode(final String info){
  String[] params;
  Profile profile;
  String s;
  params=info.split("\n");
  profile=new Profile();
  if (params.length > 0) {
    s=params[0];
    for (    final String host : OLD_SERVER_HOSTS) {
      if (s.equals(host)) {
        s=NEW_SERVER_HOST;
        break;
      }
    }
    if (s.length() != 0) {
      profile.setHost(s);
    }
  }
  if (params.length > 1) {
    s=params[1];
    if (s.length() != 0) {
      profile.setUser(s);
    }
  }
  if (params.length > 2) {
    s=params[2];
    if (s.length() != 0) {
      profile.setPassword(s);
    }
  }
  if (params.length > 3) {
    s=params[3];
    if (s.length() != 0) {
      try {
        profile.setPort(Integer.parseInt(s));
      }
 catch (      final NumberFormatException ex) {
      }
    }
  }
  return profile;
}

static Profile decode ( final String info ) { String [ ] params ; Profile profile ; String s ; params = info . split ( "\n" ) ; profile = new Profile ( ) ; if ( params . length > 0 ) { s = params [ 0 ] ; for ( final String host : OLD_SERVER_HOSTS ) { if ( s . equals ( host ) ) { s = NEW_SERVER_HOST ; break ; } } if ( s . length ( ) != 0 ) { profile . setHost ( s ) ; } } if ( params . length > 1 ) { s = params [ 1 ] ; if ( s . length ( ) != 0 ) { profile . setUser ( s ) ; } } if ( params . length > 2 ) { s = params [ 2 ] ; if ( s . length ( ) != 0 ) { profile . setPassword ( s ) ; } } if ( params . length > 3 ) { s = params [ 3 ] ; if ( s . length ( ) != 0 ) { try { profile . setPort ( Integer . parseInt ( s ) ) ; } catch ( final NumberFormatException ex ) { } } } return profile ; }
decode a login profile from a string .
