I'm developing a Java application for S60 5th edition and I need to read and write files. If I access to files in the file system the user is requested to allow / denie the file access. This is not comfortable for the user and I want to discuss another options.

For instance, J2ME offers the the possibilty to read a stream from the jar file in the Java application via getClass().getResourceAsStream( String path). This method works very well. However, I want also to write into this file.

My question is how I can do this? If I use this method, I get an InputStream from which I only can read. Is it possible to convert the Inputstream into an Outputstream?

Many Thanks.