×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    5

    J2ME File Write Access in the jar file

    Hi,

    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.

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: J2ME File Write Access in the jar file

    You cannot write to files in the JAR.

    There is an article in the wiki about persistent data in Java ME.

    Graham.

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: J2ME File Write Access in the jar file

    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.
    Signing of the Midlet can be a solution for this problem.

    OR

    Use javax.microedition.rms.RecordStore, to store each line of text as a seperate record in RMS and you can do both read/write to it.

    thanks,
    ~Amitabh

Similar Threads

  1. About Write Text File In J2me
    By abhi4u in forum Mobile Java General
    Replies: 11
    Last Post: 2012-09-26, 05:44
  2. [moved] Add jar file inside the PKG file with another sis file
    By aamitgupta in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 6
    Last Post: 2010-01-07, 12:44
  3. Access a file in C drive of symbian phone in J2ME
    By krishnakishan_c in forum Mobile Java General
    Replies: 9
    Last Post: 2010-01-07, 12:34
  4. How to read and write a binary file in J2ME
    By kamalakshan in forum Mobile Java General
    Replies: 6
    Last Post: 2008-02-29, 11:28
  5. [announce] PyUIQ. Python for UIQ 2.1 and 3.x
    By OscarBernabeu in forum Symbian
    Replies: 35
    Last Post: 2008-01-17, 09:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×