×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    188

    Question How to resolve IOException while listing all the filese from memory card?

    Hi All,

    I am trying to list all the files and folders from the memory card in thr Dopod-T4288 device.

    I wrote the code in J2ME as Dopod-T4288 supports J2ME.

    Its working fine for DOPOD-S1 and DOPOD-P660 devices and also on Dopod-T4288 device it is working properly for phone memory.

    But when trying to list the all the files and folder under memory card it's giving the IOException.

    Can any body help me to resolve this?

    Please help me....as soon as possible.

    Thanks in advance...

    Thanks & Regards,

    Ajit

  2. #2
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: How to resolve IOException while listing all the filese from memory card?

    Ajit, please note that the path for accessing the data from the Phone Memory and then Card Memory are different hence you might be getting the above exception due to the hard coded path inside your code. Get a call to the Enumeration drives = FileSystemRegistry.listRoots(); and then try to make the connection. I am sure that this you will get rid of this issue,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  3. #3
    Registered User
    Join Date
    Nov 2009
    Posts
    188

    Re: How to resolve IOException while listing all the filese from memory card?

    Thanks Raj for your reply.
    Whatever you are saying is allready done.Please find my code snippet below
    if (MEGA_ROOT.equals(currDirName)) {
    e = FileSystemRegistry.listRoots();
    browser = new List(currDirName, List.IMPLICIT);
    } else {
    currDir = (FileConnection) Connector.open("file://localhost/" + currDirName);
    e = currDir.list(); browser = new List(currDirName, List.IMPLICIT);
    // not root - draw UP_DIRECTORY
    browser.append(UP_DIRECTORY, dirIcon);
    }

    The above code snippet listing all the drives.
    But when I am selecting the memory card It's giving the IOException on the following line of code:
    e = currDir.list();
    When I am checking whether the drive is readable or not It showing not readable,not writable.and also not a directory but the drine is open.

    Is there any setting need to be done in the device for read,write access to the meory card?

    Please help me...
    Thanks & regards,
    Ajit
    Last edited by ajitkumar26; 2011-09-08 at 07:16.

  4. #4
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: How to resolve IOException while listing all the filese from memory card?

    Can you try to run the PDAP demo available there in the app folder of the Sun Java Wireless Toolkit?

    Check and revert..
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  5. #5
    Registered User
    Join Date
    Nov 2009
    Posts
    188

    Re: How to resolve IOException while listing all the filese from memory card?

    Yes Raj, I am running the PDAP demo only.

    Thanks & Regards,
    Ajit

  6. #6
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: How to resolve IOException while listing all the filese from memory card?

    Quote Originally Posted by ajitkumar26 View Post
    Yes Raj, I am running the PDAP demo only.

    Thanks & Regards,
    Ajit
    I suspect that you are referring to the WTK's in built PDAP demo. If the same is not working and not able to access the data on the memory card and throwing IOException then you may ask this issue on the Windows DiBo.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. Replies: 14
    Last Post: 2009-09-24, 16:51
  2. IOException occured:-12 with Memory card
    By JavaZOOM in forum Mobile Java General
    Replies: 5
    Last Post: 2008-04-13, 07:17
  3. Dita Direct transfer to Memory Card (not phone memory)-nokia 6270
    By sharmavijay78 in forum Series 40 & S60 Platform Feedback Archive
    Replies: 0
    Last Post: 2007-07-15, 10:12
  4. Phone Memory, SIM card memory and Memory Card
    By aliabbas in forum General Development Questions
    Replies: 2
    Last Post: 2007-06-14, 18:40
  5. Replies: 2
    Last Post: 2004-05-05, 12:01

Posting Permissions

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