Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

FileNotFound Exception  RSS feed

 
rahul shandy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The below code snippet:
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try
{
fis = new FileInputStream(path);
copyStreamToStream(fis, baos);
fis.close();
}

throws FileNotFoundException when the file name contains 2 consecutive spaces. But the same code works when there are 3 or more spaces.

i am perplexed...please help somebody. you help is Highly appreciated.

Thanks and regds,
Rahul
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!