Results 1 to 2 of 2

Thread: about files

  1. #1
    paty is offline Member
    Join Date
    Jul 2007
    Posts
    41
    Rep Power
    0

    Default about files

    Can anyone explain me what is the meaning behind following 5 lines in core java ?
    Java Code:
    String file=new String(dataBytes);
    String saveFile=file.substring(file.indexOf("filename=\"")+10);
    saveFile=saveFile.substring(0,saveFile.indexOf("\n"));
    saveFile=saveFile.substring(saveFile.lastIndexOf("\\")+1,saveFile.indexOf("\"") );
    int lastIndex=contentType.lastIndexOf("=");

  2. #2
    brianhks is offline Senior Member
    Join Date
    Jul 2007
    Posts
    135
    Rep Power
    0

    Default

    They look like they are pruning down the name of a file that is given in the form of something like this
    Java Code:
    filename="c:\somepath\somefile"
    They are stripping it down to just somefile.

Similar Threads

  1. Writing to files within jar files
    By erhart in forum Advanced Java
    Replies: 0
    Last Post: 02-04-2008, 02:50 AM
  2. Text and image files within jar files
    By erhart in forum Advanced Java
    Replies: 8
    Last Post: 01-19-2008, 04:43 AM
  3. how to convert mpeg files to .wav files
    By christina in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 04:14 AM
  4. convert xls files into pdf files
    By bbq in forum New To Java
    Replies: 3
    Last Post: 07-20-2007, 03:56 AM
  5. War Files
    By thauber in forum New To Java
    Replies: 0
    Last Post: 07-16-2007, 06:57 PM

Posting Permissions

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