• Post Reply Bookmark Topic Watch Topic
  • New Topic

FileNameFilter & FileFilter  RSS feed

 
Vikrama Sanjeeva
Ranch Hand
Posts: 760
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I can't understand both of these interfaces.Another thing is that both have accept() method taking different arguments.Why SUN has not included both methods in one interface.
Plz. Explain it.
Bye
Viki.
------------------
Count the flowers of ur garden,NOT the leafs which falls away!
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm moving this to Streams & IO since FileFilter and FilenameFilter belong to the java.io API
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
 
Marco Barenkamp
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
the difference between FileFilter and FilenameFilter is that
using a FileFilter you can decide to show/hide files and
directories.
Using a FilenameFilter you can decide showing file with specific
suffixes, such as .txt, .gif etc
------------------
Marco Barenkamp
____________________________________________
L M I N T E R N E T S E R V I C E S AG
Senior Trainer & Architect,
BEA Certified Enterprise Developer
Sun Certified Programmer for the Java2 Platform
Sun Certified Web Component Developer for the Java2 Platform
Sun Certified Developer for the Java 2 Platform
Sun Certified Enterprise Architect for the Java 2 Platform Enterprise Edition (PI)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!