How to modify the contents of a configuration file using j2me

Hi,
I'm developing a Application in j2me wherein i need to overwrite the existing contents of the configuration file(settings.cfg) with the value's that i have entered thru the front end. I was able to open and read the contents of the configuration file as follow's
InputStream is = getClass().getResourceAsStream("/settings.cfg");
Now, i need to remove the existing and updte it with the new content, how do i do it.. Kindly please help me out..
Thanks

Didn't you hear me the first time?
http://forum.java.sun.com/thread.jspa?threadID=701360&messageID=4068435#4068435

Similar Messages

  • How to read the content of ms-word file use pure java???

    how to read the content of ms-word file use pure java???

    hi,
    check this: http://jakarta.apache.org/poi/

  • How to modify the content of a xml element using java?

    Hi all,
    In my usecase I need to export some data from the database to the external file (Ms Word) using java.
    The data which I get from the database will be in the form of a xml file. In that xml file
    I got to modify the content of an attribute of a xml element in the java class. Kindly comeup with your help
    to achieve this.
    Thanks,
    Phanindra.
    Edited by: 887737 on Dec 5, 2011 5:52 AM

    Why don't you try Xerces2?Why don't you tell him to use the javax.xml APIs that are already built in? And that use Xerces2 under the hood? Instead of throwing out a suggestion that might lead to him adding another copy of Xerces into his application?
    @OP there are several techniques:
    - string replacement as suggested by jschell
    - XML parsing to a DOM and then use the DOM API
    - XSLT
    Which you should use depends on the complexity of your requirement.

  • How to modify the contents of a text file stored along with a midlet

    Hi,
    I have been developing a application in j2me wherein i need to first read the contents of the text file stored along with the midlet and later erase the existing content and update it with some text.
    I was able to read the file in the following manner
    InputStream is = getClass().getResourceAsStream("myfile.txt");
    Now i need to erase the contents and then update it the new content, how do i do it. Kinldy please help me out. It is very urgent.
    Thanks

    Didn't you hear me the first time?
    http://forum.java.sun.com/thread.jspa?threadID=701360&messageID=4068435#4068435

  • How to read the content of a text file (by character)?

    Guys,
    Good day!
    I'm back just need again your help. Is there anyone knows how to read the content of a text file not by line but by character.
    Please help me. Thank you so much in advance.
    Jojo

    http://java.sun.com/javase/6/docs/api/index.html
    package java.io
    InputStream.read(): int
    Reads the next byte of data from the input stream.
    Implementation:
    InputStreamReader
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.

  • How to get the content in embed swf file in Swf Loader on run time

    How to get the content in embed swf file in Swf Loader on run time
    [Bindable]
    [Embed(source="assets/index.swf")]
       private var SWFSRC:Class;
    <mx:SWFLoader id="_swfloader" source="{SWFSRC}" />

    Hi Flex harUI,
    Throw the error.
    Access of undefined property content

  • How to read the content of this excel file in LV

    Hi could you please let me know how can I read the content of this excel file using the Read From Speardsheet function. It contains text and numbers
    Thanks
    The excel file is attached
    Attachments:
    Datalogging.zip ‏307 KB

    Check attached VI.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    ReadFromExcel.vi ‏27 KB

  • How to modify the timestamp in a msg file?

    Hi All,
    Do you know how to modify the timestamp in a msg file which was saved from Outlook Inbox. The mail subject and body are able to be modified by selecting
    Actions - Edit Message. But it looks like the mail timestamp and the To/Cc are not able to be modified.
    Thanks,
    高麻雀

    You can convert your MSG file(s) to EML format, edit Date: header in EML file with any plain text editor (like Notepad) and then convert it back to MSG.
    You can use free
    Convert Outlook MSG to EML Files and
    Convert EML Files to Outlook MSG utilities to perform the conversion.
    Alexey Kuznetsov,
    Relief Software
    More than 100 free add-ins for Outlook

  • Is it possible to extract the contents of any PDF file using Adobe PDF SDK?

    Is it possible to extract the contents of any PDF file using Adobe PDF SDK?
    For Example: There is one pdf file. Let us say xxx.pdf with 32 pages. I am interested in only in a topic present at 10th page. Can I extract this information and save it into another pdf file (means new pdf file)?

    Thanks Irosenth,
    I am actually interested in extract the page and create a new PDF with that page. But still there is a catch that on which basis the page needs to extract either on PAGE number OR on Bookmark basis.
    But here in this scenario assume I am looking for the PDF file, now I want to save only page 5. How can I extract page 5 automatically/programmatuically? Or in simple word how can I get the reference link of page 5?
    Here I am not getting clear picture that Do I need both SDK Adobe & Acrobat to achieve this requirement. And more over you have mentioned that SDK itself is free. But on Adobe side it is mentioned that it is available by license only with this I have another doubt: To work my desktop/system application with Adobe PDF library, this library needs to distribute with the application. So in this case will it be chargeable for each and every deployment.
    Could you please provide me the link from where I can download the SDK? So that I can do some excerise with SDK to figure out the exact flow of functionality to work with my application.

  • How to check the resolution of a pdf file using Acrobat 9 pro?

    How to check the resolution of a pdf file using Acrobat 9 pro?

    PDF files don't have one resolution, but may have none or many different resolutions, one per image. You can check the maximum/minimum resoluion with preflight in Acrobat Pro, but not in Adobe Reader.

  • How to increase the speed of video (avi file) using labview

    How to increase the speed of video (.avi file) using labview? I have  tried this by skiping alternate frames. also I have used  minimum time delay.Is there  any other option for which i can go?
    please suggest me........... 

    Are you using NI Vision IMAQ AVI Read Frame or anther method to read the AVI file?
    Matthew Fitzsimons
    Certified LabVIEW Architect
    LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison

  • Help on how to read the content of an XML file from the payload

    I have a receiver channel / mail adapter, that sends e-mails with a XML attachment.
    I’m trying to write a Bean, that should make it possible to rename the attached XML file dynamically.
    In the Bean I want to read the content of the attached XML file, it could be the “order number”.
    The filename should then be “Order number”.XML.
    <u><i>Can anyone help me with how to read the content of the XML file from the payload.</i></u>
    <i><b>Frank</b></i>

    hi,
    check this: http://jakarta.apache.org/poi/

  • How to store the contents of a text file directly in to a clob field

    Hi All,
    Could anyone help me to store the contents of a text file (*.txt,*.xml etc)directly in to a clob field.
    Thanks in advance
    Jayaram.

    One way is to use sqlloader. Three files are used. A control file, an xml data file, and a file with the path of the xml data file. Here's the control file. It reads load.file, which is the file with the path of the xml data file. It names the path ext_path, and inserts the xml into field xml_field.
    CONTENTS OF CONTROL FILE:
    load DATA
    INFILE 'load.file'
    APPEND
    INTO TABLE xml_table
    ( ext_path FILLER CHAR(13),
    "XML_FIELD" LOBFILE(ext_fname) TERMINATED BY EOF
    CONTENTS OF FILE LOAD.FILE:
    /tmp/load.dat
    The xml is in the file /tmp/load.dat.
    null

  • How to modify the content of a file

    Hello All,
    If anyone of you can help me in modifying the file conent.
    let's say for example, to modify the properties file.
    I've my.properties file with keys and values as follows.
    show=false
    secure=false
    test=false
    I would like to change the "false" value to "true" of any of the keys.
    java /jsp code would be helpful.
    appreciate your help in advance.

    OK..
    Break the problem down.
    You need to:
    1- Read the file into a String/String[]
    2- Parse the file into its individual elements
    3- change some of those elements
       This involves searching the string for the index of where a particular word or combination occurs, and then finding out the value that follows it, and then changing that value...
    4- re-construct the file
    5- write the fileDoes the format of the file have to be the way you've presented it above? (Personally, I'd use a pseudo-XML tag style)
    <productdisplay>true</productdisplay>
    <stockdisplay>false</stockdisplay>
    <addtobasket>true</addtobasket>~Dave

  • How to modify the priority of UWL XML File??

    Hello,
    How do you modify the priority of a UWL generated XML file? Ths xml file was generated when I registered the SRM system in UWL.
    I tried using the tab, Universal Worklist Configuration -> Upload new Configuration but it gives an exception "Operation not allowed".
    The reason for doing this,
    Conflicting ItemTypes are defined in the SRM XML file and one of the pre-defined SAP XML file (uwl_erp2005_buyer), and the SRM XML file has a priority of "Low" compared to medium priority for the erp xml. I need to change the SRM XML priority to "HIGH".
    Any help is appreciated.
    Thank you, John

    Erwin,
    Thanks for your reply.
    I downloaded the xml file, modifed some content. While uploading with the same name, making it a high priority and selecting the required system from the dropdown, "Adapt to System", it gives the following error
    Wed Apr 08 15:50:47 CDT 2009 : Operation not allowed on UWL generated Configuration:uwl.webflow.SAP_SRM_IAC
    Any reason the system does not allow doing this?
    John Miller

Maybe you are looking for

  • Can no longer print via AirPort Extreme

    I am unable to print via my AirPort Extreme. I have a LaserJet 1320 that prints fine when directly connected to my MacBook Pro, but when plugged into the AE, it does not. I am able to see and add the printer via Bonjour, but when a document is sent t

  • Bex Analyzer displays # in the Blank Fields

    Hi Experts, When I execute the Bex Analyzer. The display gets the # in the blank field. Can anyone tell me how do I

  • Looking for other Apps DBAs Running on Windows

    I am looking to for Oracle Apps DBAs how are running Oracle Apps on a Microsoft windows platform to chat with and compaire notes.

  • 870A Fuzion Bug Report

    870A Fuzion  Bug report http://www.msi.com/index.php?func=proddesc&maincat_no=1&prod_no=2105 870A Fuzion + X2 BE555 @ Phenom II 4000MHz Ripjaws 2GB *2  1600 7-8-7 1T Power supply OCZ 850W VGA Manli GTX295 Test with Windows 7 32Bit & 64Bit nvidia driv

  • Select between more than two to next state

    Hello everyone! I'm using a state machine (look at pic), but I want to select the next state depending of a comparison with a integer (1,2,3,4,5). Well, I don't know how to select the diferents next states, because with de <<select button>> (comparis