Java Path File Check nio isPictureFile(Path file)

Here you can find the source of isPictureFile(Path file)

Description

is Picture File

License

Open Source License

Declaration

public static boolean isPictureFile(Path file) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.nio.file.Path;

public class Main {
    public static boolean isPictureFile(Path file) {
        return file.toString().toLowerCase().endsWith(".png") || file.toString().toLowerCase().endsWith(".jpg")
                || file.toString().toLowerCase().endsWith(".jpeg") || file.toString().toLowerCase().endsWith(".bmp")
                || file.toString().toLowerCase().endsWith(".gif") || file.toString().toLowerCase().endsWith(".tif")
                || file.toString().toLowerCase().endsWith(".tiff")
                || file.toString().toLowerCase().endsWith(".ico");
    }/*from w  ww  .  j  av a  2 s .  c  o m*/
}

Related

  1. isParent(Path parent, Path child)
  2. isParent(Path parent, Path path)
  3. isParentOf(Path possibleParent, Path possibleChild)
  4. isPath(Class clazz)
  5. isPermission(Path p, Function function)
  6. isRegularUsable(final Path pathToFile, final LinkOption... linkOption)
  7. isSame(Path expected, Path actual)
  8. isSameFile(Path path1, Path path2)
  9. isSteadyStateReached(Path integrationStepFile, double minStepAtEndOfStabilization)