This code causes a runtime error:
Exception in thread "main" java.io.FileNotFoundException: E:\ABN\ABN.EXE
(Het sy
steem kan het opgegeven pad niet vinden)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
at java.io.FileOutputStream.<init>(FileOutputStream.java:62)
at java.io.FileOutputStream.<init>(FileOutputStream.java:132)
at WriteThread.writeBackUp(WriteThread.java:158)
at test.main(WriteThread.java:173)
In english: The system can't find the given path. Why does this error
occures here?
Thanks in advance
--
PENTIUM = Produces Erroneous Numbers Thru Incorrect Understanding of
Math
* MSN dhert...@hotmail.com ICQ 157482585
* http://www.sphosting.com/dietmar
Never use this code. available() is almost always dodgy, and there's no
guarantee that the whole of the file will be read in one go. See IOUtil
in my library at http://www.pobox.com/~skeet/java/skeetutil for a better
way to read the whole of a stream into a byte array.
> in.close();
> FileOutputStream out = new FileOutputStream(temp2);
> if(temp.canWrite()){
Don't you mean if temp2.canWrite()? Note that the error condition will
never occur, as if you can't write the previous line will have thrown an
exception anyway.
> In english: The system can't find the given path. Why does this error
> occures here?
My guess is that the directory doesn't exist.
--
Jon Skeet - <sk...@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too