Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within I/O and Streams
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
I/O and Streams
How to find the extention of file
Shyam Purkayastha
Ranch Hand
Posts: 57
posted 21 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi all
Whenever we use a JFileChooser to get a file it returns a File object.My question is weather it is possible to get the file extension
string
from the File object.If yes then how?
Mag Hoehme
Ranch Hand
Posts: 194
posted 21 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi Shyam,
the extension is the substring beginning with the last dot. For example:
String extension = filename.substring (filename.lastIndexOf(".") + 1, filename.length();
Hope this helps.
Mag
li dalong
Greenhorn
Posts: 2
posted 21 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I want to think return .exe?what do me??
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
how to get the web link of uploaded file on web server?
java io
getting a file name
non-networked and network mode
file path?
More...