Find and Write a FILE on PC

Hi experts I need a FM in SAP to find and write a Flie on a PC. This FM is executed in SAP and is called by WebDynpro; for that the FM'S an classes that use SAP GUI aren´t good for me.
  Thanks a lot!!

Reena,
By record do you mean the columns of the internal table ??
If that is the case you can do the below.
    OPEN DATASET l_file FOR OUTPUT IN LEGACY TEXT MODE.
    Loop at it_output into is_output.
      Clear lstr.
      DO.
        ASSIGN COMPONENT SY-INDEX OF STRUCTURE is_output TO <F>.
        IF SY-SUBRC <> 0. EXIT.
        ELSE.
          if sy-index = 1.
            concatenate <F> '*' into lstr.
          else.
             concatenate lstr <F> into lstr.
          endif.
        ENDIF.
       ENDDO.
       translate lstr using '* '.
       TRANSFER lstr TO l_file LENGTH 1024.
       Append lstr to itab-line.
    endloop.
*--> Close the opened file on server
    CLOSE DATASET l_file.
Later download the file using GUI_DOWNLOAD and table itab.

Similar Messages

  • I'm trying to share folder between users on a single mac.  I put the folder in "shared," set permissions so other user can read and write, enabled file sharing, but can't find the folder on the second user's account.  Any help?

    I'm trying to share a folder between users on a single mac.  I want both users to be able to read and write so the folder stays current on both accounts.  I put the folder in "shared," set permissions on folder so other user can read and write, enabled file sharing, but can't find the folder on the second user's account.  Any help?

    Did you log out of one account and into the other or just used Fast user switching?
    Is the permissions set to anyone?
    When you move data to teh Shared folder is it copied or just moved?
    If copied then it's not a folder both can access, just a way station like a USB thumb drive that things are coped too and off of likely.
    You can run this #5 on each user account to reset the user permissions once they are taken back out of the Shared folder
    Step by Step to fix your Mac

  • File Read and Write using File Adapter in Bpel

    In Bpel Process i am using File Adapter ( Schema is Opaque) for read and write the file contents. i am able do successful deployment and read, write function in first time deployment, after that again i tired to run the application, its not going to write the content of file, its only writing the file with out data's or content in that file.
    Please help me...
    Saravanan

    Hi Eric
    In my domain.log file having the following details. In this file im unable to find out what the exact problem. Please look at this and help me.
    <2008-01-22 18:25:42,024> <INFO> <default.collaxa.cube.compiler> validating "C:\product\10.1.3.1\OracleAS_1\bpel\domains\default\tmp\.bpel_BPELProcess2_1.1_298e83988d77b6640c33dfeec11ed31b.tmp\BPELProcess2.bpel" ...
    <2008-01-22 18:25:49,850> <INFO> <default.collaxa.cube.engine.deployment> <CubeProcessFactory::generateProcessClass>
    Process "BPELProcess2" (revision "1.1") successfully compiled.
    <2008-01-22 18:25:49,914> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Loading JCAActivationAgent for {portType=Read_ptt}
    <2008-01-22 18:25:49,914> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::load - Locating Adapter Framework instance: OraBPEL
    <2008-01-22 18:25:49,930> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::load - Done loading JCAActivationAgent for processId='bpel://localhost/default/BPELProcess2~1.1/
    <2008-01-22 18:25:49,930> <INFO> <default.collaxa.cube.engine.deployment> Process "BPELProcess2" (revision "1.1") successfully loaded.
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::uninit Shutting down the JCA activation agent, processId='bpel://localhost/default/BPELProcess2~1.0/', activation properties={portType=Read_ptt}
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - performing endpointDeactivation for portType=Read_ptt, operation=Read
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> Endpoint De-activation called in adapter for endpoint : D:\MAXIMUS_Project_Softwares\jdevstudiobase10132\jdev\mywork\MyLabs\BPELProcess2\in
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::init - Initializing the JCA activation agent, processId='bpel://localhost/default/BPELProcess2~1.1/
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::initiateInboundJcaEndpoint - Creating and initializing inbound JCA endpoint for:
    process='bpel://localhost/default/BPELProcess2~1.1/'
    domain='default'
    WSDL location='rd.wsdl'
    portType='Read_ptt'
    operation='Read'
    activation properties={portType=Read_ptt}
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - endpointActivation for portType=Read_ptt, operation=Read
    <2008-01-22 18:26:02,730> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Endpoint Activation called in File Adapter for endpoint: D:\MAXIMUS_Project_Softwares\jdevstudiobase10132\jdev\mywork\MyLabs\BPELProcess2\in
    <2008-01-22 18:26:02,730> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - successfully completed endpointActivation for portType=Read_ptt, operation=Read
    <2008-01-22 18:26:02,890> <WARN> <default.collaxa.cube.activation> <File Adapter::Inbound> PollWork::run exiting, Worker thread will die
    <2008-01-22 18:26:04,171> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> Managed Connection Created
    <2008-01-22 18:26:04,171> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> Connection Created
    <2008-01-22 18:26:04,171> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> FileInteraction Created

  • Finder can not  find and display certain files. Why? Any fix,please?

    I've discovered to my surprise that Finder can not  find and display certain files. Computer is Mac book OS X (10.6.8)
    No matter what Finder settings I use, there are files which it can not detect and display.
    Here are just some examples of files sitting in the HD but Finder can not display them:
    Located in  preference panes :
    fibre channel 1.7
    Located in :    /Library/StartupItems/BRESINKx86Monitoring
    BRESINKx86Monitoring
    FxLicenseManager
    Located in    /Library/StartupItems/FxLicenseManager
    EAP8021X
    Located in    /System/Library/PrivateFrameworks/EAP8021X.framework
    The questions:
    What to make of this inability of Finder to ,well, find? (again - I tried all possible settings of Finder!)
    Is there any way to fix it?
    Thanks for any competent suggestion!

    Well, guys,
    Interesting suggestions but the problem remains -Finder (aka Spotlight) is not capable to find certain files.Period.
    I consider it as a fault of the system because in comparison, a search facility of a plain Windows based machine is capable to dig out and display any file, no matter now deeply hidden...
    As far as the suggestion above by softwater  goes , well, I've used the additional foptions  extensively and nothing produced the result needed -that's why I created this discussion.
    If someone still believes that using Finder with all its options is good enough, here is a test for you to perform on your own Mac:
    -Open  /Library/StartupItems/ and have a look inside - most likely you have a bunch of items. Write down the names of one or two of them. For this test I've chosen
    FxLicenseManager  located in    /Library/StartupItems/. You can use any file you want grom this location...
    - Then go to  Finder and set it to display everything in Library of the HD. Remember - for this test you pretend you don't know any file name in this folders.
    If the Finder works properly it shall display  folders  of Library >Startup items with all stuff inside, including the FxLicenseManager file I used for this test.
    Finder displayed nothing. It is obvious that for Finder, certain locations are off limits. That's why I consider Finder as a faulty.
    Of course if someone can set the Finder's  options to do the above search and succeed, I'll be glad to try ...:-)
    At this point, what I gather from this discussion is that :
    1. Finder (Spotlight) feature is not to be trusted,despite number of fancy but rather useless options.
    2. If you need to really find everything usually not displayed by Finder you better get real  searching software.

  • Find and replace in files does not refresh when changes are made

    Using RH10, I search for a term with the Find and Replace Options pod. I use the Find Results list as a reference only, and open each file from the Topic List. I do this instead of opening the topics from the Find Results tab because I want to see the WYSIWYG changes. Anyway, I make my edits and delete the search term from each topic. Then, to make sure I have done all the work, I run the search again. I expect to see no or at least fewer matches than before, but I still get some or all of the same results as before, even though I double-check the Design and HTML views of the topics and even check the source of a topic separately in Notepad, all indicating that the search term is gone from the topic.
    There is some ridiculous lingering or echo going on. I make sure to select Look in: <Current Project>, and the paths of all the Find Results files are fine. How do you refresh the search so that this echo doesn't occur?
    Also, I close the Find and Replace Options pod, reopen it and start the search again, and the same results are there.
    Message was edited by: DMilkes

    Hi there
    To avoid the message about the file being modified, close all topics in the editor before commencing with any find and replace operations. The message is produced because you have the aforementioned topics open in the editor.
    As you mention "Find and replace in files", I'm guessing you are referring to version 8. I just opened version 8 and performed a find and replace to confirm. There is a button allowing you to clear all.
    On the clicking and dragging to create a link, it's never worked that way. You simply cannot drag from the Topic List pod to do it. But you can from the Project Manager pod. Perhaps you should consider submitting a Wish Form to ask for the ability to click and drag from the Topic List pod to create links.
    As far as rearranging your topics into different folders, as long as you do it from inside RoboHelp you shouldn't be destroying any links. RoboHelp will update references for you as you move things around. The only issue is if you are automatically creating your TOC structure based on the project structure. But usually that's a one time shot. From there forward you just manage things using the TOC editor.
    Hopefully this helps... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • How do I find and locate duplicate files?

    What is the process to find and remove duplicate files. The tab is grayed out.   I am using version 13 and have over 1000 files and many of them are duplicates

    In unix you can use a combination of ls and diff.
    Unfortunately Apple is notorious for creating crippleware, so they have only provided this function in iPhoto and maybe iTunes.  There is no easy Finder solution, such as would make sense as part of Smart Folders!
    Stupid Apple 

  • How do I migrate files created in a Windows OS to a new external drive that is formatted as a MAC drive. I want to read and write these files back to the new drive.

    How do I migrate files from an external hard drive created in a Windows OS to a new MAC external drive? I want to read and write these files to the new drive.

    LKrzesowski wrote:
    How do I migrate files from an external hard drive created in a Windows OS to a new MAC external drive? I want to read and write these files to the new drive.
    If all you're trying to do is move the files from the Windows external to the Mac external, you can simply connect them both to the Mac and drag the files from the Windows drive to the Mac drive. If you want to move the files back and forth between them, you'll need to establish the format of the Windows external. Macs can read and write to FAT32 and exFAT (which can handle files larger than 4GB) formatted drives but can only read NTFS formatted drives without additional software. With the Windows drive connected, you can check its format with Disk Utility.

  • Find and delete duplicate files on my macbook pro?

    How can I find and delete duplicate files on my macbook pro. Just that i have so many and i think it is wasting a lot of memory etc on my mac! is there a simple and easy way to do so. Like i know in itunes you can just go to one of the opitions and show duplicates, is there anything like that with finder for my whole macbook?
    Thanks in advance!:)

    Decloner will compare the files themselves, not just by name or size.
    For the latest version and faster updates, also to give the developer a extra 30%, choose the developers site version, simply hold control or option key to temporarily turn off Mountain Lion's annoying Gatekeeper to run the app.
    http://www.pixelespressoapps.com/decloner/

  • Wire to cb, graph and write to file

    I have a tensile tester, I want to produce a vi that can directly display a chart of force and extension. I have 3 wires , force 0-10volts , extension 0-10v and ground. I do not know which point to wire it on a green board CB 68 LP ? I then want to get a chart and write both to an excel file. I'm new to labview but it would be a great help. Can you help me? James

    Hi James,
    What is you CB-68LP connected to? Does it lead to a PCI card in your computer? If so, what is the model number of that card?
    You can find out how to wire you CB-68LP by opening Measurement and Automation Explorer (MAX) on your computer. Look for your PCI card on the left hand side under My System>>Devices and Interfaces. If you right click on your device then go to "device pinout" this will show you the numbers associated with the various pins. Its then just a case of matching that Pinout with what you can see on your CB-68LP.
    Regarding writing your information to an Excel file, have a look at the "write to measurement file" express function. You can find this by going to the Functions Pallet>>Express>>Output.

  • Create OutputFile in jsp and write this file to response

    Hello
    Please can you help me
    I need to dynamically create a file in jsp and send this file to user
    Please help

    Don't forget to set the contentLength. Some clients/applications will refuse to run/open the file otherwise.
    At the bottom of this article you can find several reuseable downloadFile() utility methods: http://balusc.xs4all.nl/srv/dev-jep-pdf.html
    I'll copypaste them here:
    package net.balusc.util;
    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.ByteArrayInputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.net.URLConnection;
    import javax.servlet.http.HttpServletResponse;
    public class HttpServletUtil {
         * Send the given file as a byte array to the servlet response. If attachment
         * is set to true, then show a "Save as" dialogue, else show the file inline
         * in the browser or let the operating system open it in the right application.
         * @param response The HttpServletResponse to be used.
         * @param bytes The file contents in a byte array.
         * @param fileName The file name.
         * @param attachment Download as attachment?
        public static void downloadFile(HttpServletResponse response, byte[] bytes, String fileName, boolean attachment) throws IOException {
            // Wrap the byte array in a ByteArrayInputStream and pass it through another method.
            downloadFile(response, new ByteArrayInputStream(bytes), fileName, attachment);
         * Send the given file as a File object to the servlet response. If attachment
         * is set to true, then show a "Save as" dialogue, else show the file inline
         * in the browser or let the operating system open it in the right application.
         * @param response The HttpServletResponse to be used.
         * @param file The file as a File object.
         * @param attachment Download as attachment?
        public static void downloadFile(HttpServletResponse response, File file, boolean attachment) throws IOException {
            // Prepare stream.
            BufferedInputStream input = null;
            try {
                // Wrap the file in a BufferedInputStream and pass it through another method.
                input = new BufferedInputStream(new FileInputStream(file));
                downloadFile(response, input, file.getName(), attachment);
            } catch (IOException e) {
                throw e;
            } finally {
                // Gently close stream.
                if (input != null) {
                    try {
                        input.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                        // This is a serious error. Do more than just printing a trace.
         * Send the given file as an InputStream to the servlet response. If attachment
         * is set to true, then show a "Save as" dialogue, else show the file inline
         * in the browser or let the operating system open it in the right application.
         * @param response The HttpServletResponse to be used.
         * @param input The file contents in an InputStream.
         * @param fileName The file name.
         * @param attachment Download as attachment?
        public static void downloadFile(HttpServletResponse response, InputStream input, String fileName, boolean attachment) throws IOException {
            // Prepare stream.
            BufferedOutputStream output = null;
            try {
                // Prepare.
                int contentLength = input.available();
                String contentType = URLConnection.guessContentTypeFromName(fileName);
                String disposition = attachment ? "attachment" : "inline";
                // Init servlet response.
                response.setContentLength(contentLength);
                response.setContentType(contentType);
                response.setHeader("Content-disposition", disposition + "; filename=\"" + fileName + "\"");
                output = new BufferedOutputStream(response.getOutputStream());
                // Write file contents to response.
                while (contentLength-- > 0) {
                    output.write(input.read());
                // Finalize task.
                output.flush();
            } catch (IOException e) {
                throw e;
            } finally {
                // Gently close stream.
                if (output != null) {
                    try {
                        output.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                        // This is a serious error. Do more than just printing a trace.
    }

  • Java Applet: choose, read and write local file

    Can some body please help in writing a Java Applet with the following features:
    1. FileChooser button to select a local text file
    2. Load button
    3. Read the file line by line, process it and write into a text file.

    AnilK wrote: Thank you very much.
    Those are just empty words. You can show your thanks in ways that are more useful both to me and you.
    To better show your thanks you might..
    1) Stop treating me as though I were your servant. In a conversation, you might ask a question that I try to answer. As part of my answer, I might need to ask you some questions. A question is a sentence followed by '?'. I did ask you some questions. There are four questions I asked in my first reply. Please answer my questions so I can provide you the best advice.
    2) Do not ignore things I say. (see below*)
    AnilK wrote: However, I still have a problem where the applet can not write a local text file.
    * That is probably because you ignored what I mentioned about digitally signing the applet. If you do not understand anything I write, please do a search and if that does not help you to understand it, ask me what I mean.
    AnilK wrote: Can some body please help me out.
    I was happy to help, but my enthusiasm is dropping quickly. Unless you can manage to improve your replies, I will not help further.
    I will supply some more tips before I finish this message and wait to see your reply, to decide whether I will help further.
    1) If you use 'code' delimiters, the Java code will be colored nicely for people to read. Here is an example (e.g.).
    } catch (Exception e) {
    ret = "problem found. Please reload.";
    return ret;
    2) I had a point here about indenting code, but when I went to reply, the code was indented, which makes me think that using code delimiters would also fix the problem where the code looks as if it has no indentation.
    3) It is 'best practice' (unless you are an expert and can justify otherwise) to dump every stacktrace to find out what really happened. e.g.
      } catch (Exception e) {
        // Very important!  Find out why it failed!
        e.printStackTrace();
        // now go on to do the other things..
        ret = "problem found. Please reload.";
      return ret;
    } 4) When you get a stacktrace, copy/paste at least the first few lines into the message. If my guess about the cause of the problem is correct, the word 'security' will appear somewhere in the stacktrace.
    5) To encourage people to help, post compilable examples, rather than code snippets.
    <http://homepage1.nifty.com/algafield/sscce.html>
    By the way - congratulations on getting as far as you have. You have surprised me that you got so far already. Improve on the other things I mentioned, and I would be happy to help further.

  • Read PDF Formatted Spool and write PDF File to Application Server

    Hi Experts,
    After ECC 6.0, HR-W2 and W2C Form Spools are getting generated in PDF format.
    We have a requirement wherein we want to read the PDF Spool Programatically and write the PDF file to Application server (Using OPEN DATASET and CLOSE DATASET)
    PARAMETERS : p_spono LIKE tsp01-rqident.
    DATA: pdf_data type FPCONTENT.
    types: lt_pdf_table(1000) type x.
    data:  l_pdf_data type standard table of lt_pdf_table,
           l_pdf_line type lt_pdf_table,
           l_offset type i,
           l_len type i,
           p_file(100) VALUE '\sapout\DVH\pdf2.pdf'.
    *Read the spool content
    CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
        EXPORTING
             i_spoolid = p_spono
             i_partnum = '1'
        IMPORTING
               e_pdf = pdf_data
    *         e_pdf_file = file
        EXCEPTIONS
             ads_error = 1
             usage_error = 2
             system_error = 3
             internal_error = 4
        OTHERS = 5.
    * Modify the spool  contents to prepare internal table
      l_len = xstrlen( pdf_data ).
      while l_len >= 1000.
        l_pdf_line = pdf_data+l_offset(1000).
        append l_pdf_line to l_pdf_data.
        add 1000 to l_offset.
        subtract 1000 from l_len.
      endwhile.
      if l_len > 0.
        l_pdf_line = pdf_data+l_offset(l_len).
        append l_pdf_line to l_pdf_data.
      endif.
    * GUI DOWNLOAD Works Fine
    * Now pdf contents is ready , lets store in local PC
    *CALL FUNCTION 'GUI_DOWNLOAD'
    *  EXPORTING
    *   filename                        = 'C:\Documents and Settings\Desktop\shital.pdf'
    *   filetype                        = 'BIN'
    *  TABLES
    *    data_tab                        = l_pdf_data.
    OPEN DATASET p_file FOR OUTPUT IN BINARY MODE.
    IF sy-subrc <> 0.
      MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
              ' Error opening file:'(Z03) p_file.
    ENDIF.
    LOOP AT l_pdf_data INTO l_pdf_line.
      TRANSFER l_pdf_line TO p_file.
    ENDLOOP.
    CLOSE DATASET p_file.
    IF sy-subrc <> 0.
      MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
              ' Error closing file:'(Z04) p_file.
    ENDIF.
    Currently as you can see I have commented out GUI_DOWNLOAD Function Module, But it works perfect when I try to Download file to Local Desktop.
    But when I try to pass the same Contents to Application server file and then try to open it by downloading file then it opens BLANK pdf file.
    As per requirements I should be able to write the file correctly on Application server and If I dowload it from there it should open PDF file correctly.
    Let me know if you require further details about the issue.
    Regards
    Shital
    Edited by: shital phadake on Apr 8, 2009 9:39 PM

    Thanks Selçuk for your reply and taking time for understanding the Issue,
    I went thru Functionality of the program you suggested but dont think it matches my requirement.
    Regards
    Shital

  • How to select the data from DB and write into File?

    Hi Experts,
    Can any one please help me,
    I want to write the data from a table "T1" from Data Base to one file in windows.
    This functionality i need to achive in SSIS package through script component and Execute SQL task if it's passible.
    If any other way is there please help me.

    through script component and Execute SQL task if it's passible
    The easier way is to use a "Data Flow" Task with a "OleDB Data Source" pointing the the SQL Server table / query and a "Flat File Destination" to export to a file.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How can I find and delete duplicate files in Mt Lion?

    As a competent, but self-trained mac user for 30 years, I'm totally baffled by the sudden appearance of multiple duplicate documents and .jpgs in my imac files. How can I find and delete them?

    Duplicate Annihalitor - http://brattoo.com/propaganda/ - or Decloner - http://www.pixelespressoapps.com/decloner/
    LN

  • How to read a text file and write text file

    Hello,
    I have a text file A look like this:
    0 0
    0 A B C
    1 B C D
    2 D G G
    10
    1 A R T
    2 T Y U
    3 G H J
    4 T H K
    20
    1 G H J
    2 G H J
    I want to always get rid of last letter and select only the first and last line and save it to another text file B. The output should like this
    0 A B
    2 D G
    1 A R
    4 T H
    1 G H
    2 G H
    I know how to read and write a text file, but how can I select the text when I am reading a text file. Can anyone give me an example?
    Thank you

    If the text file A look like that
    0 0
    0 3479563,41166 6756595,64723 78,31 1,#QNAN
    1 3479515,89803 6756588,20824 77,81 1,#QNAN
    2 3479502,91618 6756582,6984 77,94 1,#QNAN
    3 3479516,16334 6756507,11687 84,94 1,#QNAN
    4 3479519,14188 6756498,54413 85,67 1,#QNAN
    5 3479525,61721 6756493,89255 86,02 1,#QNAN
    6 3479649,5546 6756453,21824 89,57 1,#QNAN
    1 0
    0 3478762,36013 6755006,54907 54,8 1,#QNAN
    1 3478756,19538 6755078,16787 53,63 1,#QNAN
    2 0
    3 0
    N 0
    I want to read the line that before and after 1 0, 2 0, ...N 0 line to arraylist. I have programed the following code
    public ArrayList<String>save2;
    public BufferedWriter bufwriter;
    File writefile;
    String filepath, filecontent, read;
    String readStr = "" ;
    String[]temp = null;
    public String readfile(String path) {
    int i = 0;
    ArrayList<String> save = new ArrayList <String>();
    try {
    filepath = "D:\\thesis\\Material\\data\\CriticalNetwork\\test3.txt";
    File file = new File(filepath);
    FileReader fileread = new FileReader(file);
    BufferedReader bufread = new BufferedReader(fileread);
    this.read = null;
    // read text file and save each line content to arraylist
    while ((read = bufread.readLine()) != null ) {
    save.add(read);
    // split each arraylist[i] element by space and save it to String[]
    for(i=0; i< save.size();i++){
    this.temp = save.get(i).split(" ") ;
    // if String[] contain N 0 such as 0 0, 1 0, 2 0 then save its previous and next line from save arraylist to save2 arraylist
    if (temp.equals(i+"0")){
    this.save2.add(save.get(i));
    System.out.println(save2.get(i));
    } catch (Exception d) {
    System.out.println(d.getMessage());
    return readStr;
    My code has something wrong. It always printout null. Can anyone help me?
    Best Regards,
    Zhang

Maybe you are looking for

  • The difference between IEEE802.1Q Native VLAN sub-interface and Physical interface?

    Hello I think the following topologies are supported for Cisco Routers And the Physical interface also can be using as Native VLAN interface right?  Topology 1.  R1 Gi0.1 ------ IEEE802.1Q Tunneling  L2SW ------ Gi0 R2 R1 - configuration interface Gi

  • How to publish a SWF with local access permissions

    Hi all, We have been purchased a training course made with Flash. When we received the course (a SWF file with external files inside a "data" directory, images, videos, etc), we realized that it was necessary to explicity give permissions to Flash Pl

  • No ability to create PDF Files using Acrobat 6.01_6.06 after installing Word 2010. (Windows XP)

    Since installing Word 2010 (upgrading from Word 2003) there are no visable PDF Icons nor ability to create PDF Files using Adobe Acrobat 6.06.  Operating system is Windows XP.  Browser is IE8.  Various attempts to bypass this situation have not been

  • Scope of the BPM Process variables

    Hi All, What is the scope of the process variables in a BPM Process? I had defined couple of process variables in my BPM process and observed that whenever i go into a Human Task activity and come back to the BPM process all my process variables valu

  • Not all photos show up in iTunes sync

    I have always used Lightroom (professionally) and iPhoto (snapshots), but decided to give Aperture a try and bought it this week. I have imported the iPhoto library (about 8000 photos), which went well. Then I wanted iTunes to start syncing my Apple