<phillip.s.powell@gmail.com> wrote:
I hope this makes it more clear:
*update* still fails, can't fix it this time..
Here are my methods
public static void toFile(File file, Object contents) throws
IOException {
FileOutputStream out = new FileOutputStream(file);
I assume you got the Exception in the line above.
(Unfortunately you missed to post the complete exception stack trace)
out.write(contents.toString().getBytes());
}
public static void toFile(String filePath, Object contents) throws
IOException {
File file = new File(filePath);
toFile(file, contents);
}
}
I get this exception thrown:
file:\C:\Documents%20and%20Settings\me\stave.ico (The filename,
directory name, or volume label syntax is incorrect)
The exception says it all: You try to open a file in directory
file:\C:\Documents%20and%20Settings\me
which, of course, doesn't exist.
What you really want to do, is to open a file in directory
C:\Documents and Settings\me
I.e. you have to use
C:\Documents and Settings\me\stave.ico
as filePath in your code above.
* and open the template in the editor.