This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "reading files in specified directory" Watch "reading files in specified directory" New topic

reading files in specified directory

Ravindra Suroju

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

Joined: Oct 13, 2005
Posts: 37943
More useful tutorial from Sun here. Look for the link to file I/O especially.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: reading files in specified directory
Similar Threads
where is PortableRemoteObject
Default welcom files
reading files in specific directory
JAAS1.0 sample Error
Possible to get listing of all files in directory?