public static void parseGenericFileUri(String uri,FileIdentifier identifier){
  if (uri.startsWith("file://"))   identifier.onLocalFile();
 else   if (uri.startsWith("http://"))   identifier.onHttpFile();
 else   if (uri.startsWith("android.resource://"))   identifier.onAsset();
}

public static void parseGenericFileUri ( String uri , FileIdentifier identifier ) { if ( uri . startsWith ( "file://" ) ) identifier . onLocalFile ( ) ; else if ( uri . startsWith ( "http://" ) ) identifier . onHttpFile ( ) ; else if ( uri . startsWith ( "android.resource://" ) ) identifier . onAsset ( ) ; }
in order to determine the correct file parser , you can provide the uri and this method will find the appropriate parser to use
