Code example for URI

Methods: getSchemegetSchemeSpecificParttoString

0
  } 
 
  @Override 
  public DatabusSubscription decode(URI uri) throws DatabusException
  { 
    String scheme = uri.getScheme();
    String s = getScheme().equals(scheme) ? uri.getSchemeSpecificPart() : uri.toString();
 
    return DatabusSubscription.createSimpleSourceSubscription(s);
  } 
 
  @Override 
  public URI encode(DatabusSubscription sub)
  { 
    try 
    { 
      String uriSsc = DatabusSubscription.createStringFromSubscription(sub);
      URI result = uriSsc.indexOf(':') >=0 ? new URI(getScheme(), uriSsc, null) : new URI(uriSsc);
      return result;
    } 
Stop searching for code, let great code find you!  Add Codota to your java IDE