Re: How to save binary files?

2010-05-30 Thread Alex Zeit
Thank you very much Edward for your help. The solution was to create
temporary directory and place files there:

final File temp = File.createTempFile(temp,
Long.toString(System.nanoTime()));
if (!(temp.delete())) {
throw new IOException(Could not delete temp file: 
+ temp.getAbsolutePath());
}

if (!(temp.mkdir())) {
throw new IOException(Could not create temp directory: 
+ temp.getAbsolutePath());
}


Re: How to save binary files?

2010-05-28 Thread Edward Zarecor
This looks like an issue with your Java installation, which you could verify
with a simple standalone test, e.g.,

public static void main(String[] args) { // create file as in Wicket.. }

Ed.


On Fri, May 28, 2010 at 11:12 AM, Alex Zeit zeita...@googlemail.com wrote:

 Dear All,
 I am a bit confused where the error is: Is it Ubuntu Tomcat configuration
 or
 there is a specific approach to save files from Wicket.
 My Application generates several binary files. After files generated I want
 to pack them in zip archive and allow user to download them.
 Is it possible to do this in Wicket? If so where should I save those files
 and how?
 Should I get temp filestore folder?
 While trying to write files to disk I am getting the following error:
 May 28, 2010 10:50:08 AM java.util.prefs.FileSystemPreferences$2 run
 WARNING: Couldn't create user preferences directory. User preferences are
 unusable.
 May 28, 2010 10:50:08 AM java.util.prefs.FileSystemPreferences$2 run
 WARNING: java.io.IOException: No such file or directory

 Thanks a lot in advance,
 Alex