wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes reading files in specified directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "reading files in specified directory" Watch "reading files in specified directory" New topic
Author

reading files in specified directory

Ravindra Suroju
Greenhorn

Joined: Mar 11, 2008
Posts: 14
How can i read the files in specified directory?


Best Regards,<br />Ravindra.
Anubhav Anand
Ranch Hand

Joined: May 18, 2007
Posts: 341

Ravindra Kumar S,
Welcome to JavaRanch.

For reading files from a directory you require to use InputStream classes.
You may use DataInputStream and/or FileInputStream and/or BufferedInputStream.

Also, you may like to view this tutorial. This may also be useful.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38441
    
  23
More useful tutorial from Sun here. Look for the link to file I/O especially.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: reading files in specified directory