Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

android check file extension

//if you have the path
String someFilepath = "image.fromyesterday.test.jpg"; 
String extension = someFilepath.substring(someFilepath.lastIndexOf("."));

//direct with file
String extension = ff.getAbsolutePath().substring(ff.getAbsolutePath().lastIndexOf("."));
Comment

PREVIOUS NEXT
Code Example
Java :: enhance for loop java 
Java :: how to know if a file is iso-8859-1 encoded in java 
Java :: How to perform an iterative inorder traversal through a binary search tree, in Java? 
Java :: reader from string java 
Java :: java words from file 
Java :: java new string 
Java :: why are my if statements not working with inputs in java 
Java :: string a int java 
Java :: how to get the memory location of an object in java 
Java :: java sub function 
Java :: how to print all package in java 
Java :: Java Hashmap Replace Elements 
Java :: 9999999999999 
Java :: boolean checkbox swing 
Java :: java clear scanner2 
Java :: java use parent method 
Java :: java create array 
Java :: permutation and combination program in java 
Java :: how to make a rest api in spring 
Java :: while loops java 
Java :: get field name java 
Java :: run java file 
Java :: import image icon 
Java :: java and or precedence 
Java :: string into ascii in java 
Java :: data structures in java 
Java :: Passing data from an activity to a fragment 
Java :: swagger ui java 
Java :: java enum in switch statement 
Java :: array methods in java 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =