@Test public void testIsFile() throws Exception { Assert.assertTrue(IoUtils.isFile(Uri.fromFile(new File(".")))); Assert.assertTrue(IoUtils.isFile(Uri.parse("file:/a/b/c"))); Assert.assertFalse(IoUtils.isFile(Uri.parse("http: }
public static boolean isFile(Uri uri) { return uri != null && SCHEME_FILE.equals(uri.getScheme()); }
IoUtils { public static boolean isFile(Uri uri) { return uri != null && SCHEME_FILE.equals(uri.getScheme()); } }
IoUtils { public static boolean isFile(Uri uri) { return uri != null && SCHEME_FILE.equals(uri.getScheme()); }  }
IoUtils { public static boolean isFile(Uri uri) { return uri != null && SCHEME_FILE.equals(uri.getScheme()); }  static boolean saveFile(File file, byte[] content); static boolean saveBitmap(File file, Bitmap bitmap,
                                     Bitmap.CompressFormat format, int quality); static boolean saveBitmap(ContentResolver contentResolver, Uri uri, Bitmap bitmap,
                                     Bitmap.CompressFormat format, int quality); static boolean copyAssets(AssetManager assetManager, String assetsPath, File dst); static boolean copyFile(File src, File dst); static boolean copyFile(ContentResolver contentResolver, Uri src, File dst); static boolean copyStream(InputStream src, File dst); static void copyStream(InputStream src, OutputStream dst); static FileOutputStream openFileOutputStream(File file); static boolean close(Closeable closeable); static String readString(File file); static String readString(InputStream in); static byte[] toByteArray(InputStream input); static long getExtStorageAvailable(); static boolean hasExtStorage(); static boolean rmFile(File file); static boolean rmR(File file); static long getTotalLength(File file); static boolean ensureDirsExist(File dir); static File fromFilesDir(Context context, String path); static File fromCacheDir(Context context, String path); static boolean isAppPrivate(Context context, File file); static boolean isInDataDir(Context context, File file); @NonNull static File getDCIMDirectory(String type); @NonNull static File getAvailableExternalStoragePublicDirectory(String type); @NonNull static File fromPublicPath(Context context, String path); @NonNull static File generateDatedFile(File directory, String suffix); @NonNull static File generateDatedFile(File directory, String suffix, boolean twoStage); @NonNull static File generateDatedFile(File directory, String suffix, boolean twoStage, boolean createNewFile); @NonNull static File createTempFile(Context context, String suffix, boolean isPublic); static boolean isFile(Uri uri); static File toFile(Uri uri); }
IoUtils { public static boolean isFile(Uri uri) { return uri != null && SCHEME_FILE.equals(uri.getScheme()); }  static boolean saveFile(File file, byte[] content); static boolean saveBitmap(File file, Bitmap bitmap,
                                     Bitmap.CompressFormat format, int quality); static boolean saveBitmap(ContentResolver contentResolver, Uri uri, Bitmap bitmap,
                                     Bitmap.CompressFormat format, int quality); static boolean copyAssets(AssetManager assetManager, String assetsPath, File dst); static boolean copyFile(File src, File dst); static boolean copyFile(ContentResolver contentResolver, Uri src, File dst); static boolean copyStream(InputStream src, File dst); static void copyStream(InputStream src, OutputStream dst); static FileOutputStream openFileOutputStream(File file); static boolean close(Closeable closeable); static String readString(File file); static String readString(InputStream in); static byte[] toByteArray(InputStream input); static long getExtStorageAvailable(); static boolean hasExtStorage(); static boolean rmFile(File file); static boolean rmR(File file); static long getTotalLength(File file); static boolean ensureDirsExist(File dir); static File fromFilesDir(Context context, String path); static File fromCacheDir(Context context, String path); static boolean isAppPrivate(Context context, File file); static boolean isInDataDir(Context context, File file); @NonNull static File getDCIMDirectory(String type); @NonNull static File getAvailableExternalStoragePublicDirectory(String type); @NonNull static File fromPublicPath(Context context, String path); @NonNull static File generateDatedFile(File directory, String suffix); @NonNull static File generateDatedFile(File directory, String suffix, boolean twoStage); @NonNull static File generateDatedFile(File directory, String suffix, boolean twoStage, boolean createNewFile); @NonNull static File createTempFile(Context context, String suffix, boolean isPublic); static boolean isFile(Uri uri); static File toFile(Uri uri); static final String SCHEME_FILE; }