Results 1 to 1 of 1
  1. #1
    kiab3000 is offline Member
    Join Date
    Mar 2009
    Rep Power

    Default Reading from file

    Hi, I'm having problems reading files from a container. This is the code:

    IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
    IResource resource = root.findMember(new Path(containerName));
    IContainer container = (IContainer) resource;
    final IFile file = container.getFile(new Path(fileName));

    FileInputStream input = new FileInputStream(file.getFullPath.toString());
    BufferedReader reader = new BufferedReader(new InputStreamReader (input));

    I suspect that the failure occurs on the line i have highlighted, when this line is executed File remains null so i am assuming it is going wrong here
    any help you can give me would greatly be appreciated.
    many thanks
    Last edited by kiab3000; 03-15-2009 at 08:45 PM.

Similar Threads

  1. Help for reading a doc file
    By thehero in forum New To Java
    Replies: 1
    Last Post: 02-24-2009, 07:44 AM
  2. Reading a File
    By zoom1017 in forum New To Java
    Replies: 4
    Last Post: 02-20-2009, 04:04 AM
  3. reading csv file help
    By fritz1474 in forum New To Java
    Replies: 5
    Last Post: 09-04-2008, 09:41 PM
  4. Right use of file reading ?
    By jurka in forum New To Java
    Replies: 3
    Last Post: 08-27-2008, 09:16 PM
  5. Reading a file for use
    By peachyco in forum New To Java
    Replies: 2
    Last Post: 11-27-2007, 04:49 AM

Posting Permissions

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