Code example for URI

Methods: toASCIIString

0
  } 
 
  public void setAndPersistClusterURL(URI u, SharedPreferences prefs) {
    boolean shouldPersist = (prefs != null) && (clusterURL == null);
 
    Log.d(LOG_TAG, "Setting cluster URL to " + u.toASCIIString() +
                   (shouldPersist ? ". Persisting." : ". Not persisting."));
    clusterURL = u;
    if (shouldPersist) {
      Editor edit = prefs.edit();
      edit.putString("clusterURL", clusterURL.toASCIIString());
      edit.commit();
    } 
  } 
 
  public void setClusterURL(URI u) {
    setClusterURL(u, this.getPrefs());
  } 
 
  public void setClusterURL(URI u, SharedPreferences prefs) {