×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    44

    Supporting of Text File by MIDP2.0

    HI
    all of you
    Can MIDP2.0 supports any TextFile? If it supports . Please Let me Know.

    Thanks
    Ojak Dev

  2. #2
    Registered User
    Join Date
    Nov 2004
    Posts
    6

    Question

    What exactly do you mean support a text file. What are you going to use a text file for? You can use a text file for input (as long as it is stored within the Jar file of your application. If you are talking about writing to a text file then I don't believe that it is supported, you will have to use a RecordStore.

  3. #3
    Registered User
    Join Date
    Jul 2004
    Posts
    44
    Thanks

  4. #4
    Registered User
    Join Date
    Jul 2004
    Posts
    44
    Thanks again for your suggesstion but i want to know one thing more that Is it possible to read from the text file .

  5. #5
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    Using the Class.getResourceAsStream() method you get an InputStream object. With it you can read the file in a few ways (wrappint the stream in a DataInputStream and using it's methods, reading into a byte array and passing it to a String constructor, reading byte by byte and appending to a StringBuffer, etc.).

    shmooove

Posting Permissions

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