This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reading files in specified directory

 
Ravindra Suroju
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i read the files in specified directory?
 
Anubhav Anand
Ranch Hand
Posts: 341
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More useful tutorial from Sun here. Look for the link to file I/O especially.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic