I need help in reading files.

Ok so im about as new to java as it comes, and im trying to make this program that can take information from a line in a text file.
So for example my text file is like (each line means a different thing exc)
3
525
321
223
2
535
255
552
and the numbers represent data for the thing im making.
Now the problem I have, is im using
input = new BufferReader (new FileReader (data.txt));
        line = inFile.readInt ();
        for (times = 1 ; times <= line ; times++)
            int lines = inFile.readInt ();To try to read the data in the file, but I am having difficulty in finding how to read the seperate lines.
(like how to take the number in Line 2 and make it into a variable so I can use it in the program)
Whats the best way to do this?

I think the best way is to create a file such as:
property1 = 12
property2 = 13
heigth = 2
width = 666
and then use the class Property in this way:
import java.io.File;
import java.io.FileInputStream;
import java.util.Properties;
public class ProvaProperties {
     public ProvaProperties() {
          try {
               File file = new File("properties.txt");
               FileInputStream is = new FileInputStream(file);
               Properties prop = new Properties();
               prop.load(is);
               prop.getProperty("heigth");
          } catch (Exception e) {
               e.printStackTrace();
}if you want to read an integer form an existing file you have to use the line = input.readLine() method in the code you have just posted and then use the Integer.parseint(line) method.

Similar Messages

  • Need help in reading file, got stuck

    The code below works sometimes sometimes gives a message problem finding/reading file
    public void readData()
    try
    DataInputStream dataIn = new DataInputStream(new FileInputStream("c://suneetha//data.txt"));
    for(i=0;i<3;i++)
    for(j=0;j<3;j++)
    goal[j] = (dataIn.readInt());
    dataIn.close();
    catch (IOException e){ System.out.println("problem finding/reading file");}
    catch (NumberFormatException nfe) { System.out.println("problem with format"); }
    public void writeData()
    int i=0,j=0;
    InputStreamReader is = new InputStreamReader( System.in );
    // Wrap input with a BufferReader to get
    // the readln() method to read a whole line at once.
    BufferedReader br = new BufferedReader( is );
    try {
    DataOutputStream dataOut = new DataOutputStream(new FileOutputStream("c://suneetha//data.txt"));
    System.out.println("enter the array:");
    String s = br.readLine(); // Read the whole line
    st = new StringTokenizer(s);
    // With tokenizer nextToken() method we can ignore
    // any beginning and trailing white space.
    for(j=0;j<9;j++)
    i=Integer.parseInt(st.nextToken());//Convert string to int
    System.out.println( "got: " + i );
    j=i;
    dataOut.writeInt(j);
    catch (IOException ioe) {
    System.out.println( "IO error:" + ioe );
    not knowing what the problem is!!!
    some times it accepts data from file(for reading) some times it wont.
    I don't thing there is any problem with writing to the file
    Any help is greatly appreciated
    Thanks
    Suneetha.

    Are you not posting this for third time ( and with same problems.)
    Anyways.....
    for(i=0;i<3;i++)
    for(j=0;j<3;j++)
    goal[j] = (dataIn.readInt()); // ????You want them in a 2 d array ?then make goal
    int [][] goal = new int[3][3];
    And
    // use
    if( dataIn.available() > 0 ){
    goal[ i ][j] = dataIn.readInt();
    else{
      // Your "custom" messages
    }

  • Need help with "reading" files ...

    Okay, here's the scoop in two versions ...
    The Short and Sweet:
    I'm VERY new to Java programming, but before I dedicate a lot of time into my project, I need to know first if it is possible for a java.class applet (running in a browser, online) to read from a text file located on the (remote) server - ie: the same server and path as the java.class applet is located.
    The Long and Confusing:
    The primary objective is to recursively read from a constantly changing data/text file (generated by a php script), then "parse" that data into certain variables which in turn affect the (browser) output viewed by the visitor. A simplified example of this would be to capture x-y coordinates generated by a perpetually running php script (via a "shared" text file), then the applet would use this "read" data to constantly update the x-y positions of two (or more) graphical objects within the running applet.
    Hope this makes sense. I'm not asking anybody to actually code this for me (though an example would be nice) ... I really just need to know if it can be done before delving into this somewhat paramount project. Thanks.
    --Mikey

    The Short and Sweet:
    I'm VERY new to Java programming, but before I
    dedicate a lot of time into my project, I need to know
    first if it is possible for a java.class applet
    (running in a browser, online) to read from a text
    file located on the (remote) server - ie: the same
    server and path as the java.class applet is located.
    It is possible to use an Applet to read a file from the server, but you need to use a URL stream, not a file stream because of the Applet security constraints. Applet.getCodeBase() will return the URL of the directory where the Applet is. You can use the URL to create a URL to the file. Then read the new URL's InputStream.

  • Need help to read Instant messenger packet

    I need help to read the IM packet from the LAN.Can anyone help me? I doing my project to monitor the IM in LAN.If got example,pls show me.

    There are several problems with this. First, it is not possible to separate IM packets from any other packets floating around a network. Second, to peek at packets intended for other computers is a pretty big no no.
    If you really need to do this, build a proxy server or some layer in the middle of your IM where you can record
    I need help to read the IM packet from the LAN.Can
    anyone help me? I doing my project to monitor the IM
    in LAN.If got example,pls show me.

  • Need help with reading XML using File Adapter

    I have created a simple BPEL process that uses a file adapter to read files containing XML messages of a simple xsd schema. But when reading the xml, I get the following error message:
    [2010/03/01 23:43:13] Invalid data: The value for variable "Receive_1_Read_InputVariable", part "revision-report" does not match the schema definition for this part.The invalid xml document is shown below: More...
    [2010/03/01 23:43:13] "{http://schemas.oracle.com/bpel/extension}invalidVariables" has been thrown. less
    -<invalidVariables xmlns="http://schemas.oracle.com/bpel/extension">
    -<part name="code">
    <code>
    9710
    </code>
    </part>
    -<part name="summary">
    <summary>
    Invalid xml document.
    According to the xml schemas, the xml document is invalid. The reason is: Error::cvc-complex-type.4: Attribute 'doc' must appear on element 'revision-report'.
    Error::cvc-complex-type.4: Attribute 'model' must appear on element 'revision-report'.
    Error::cvc-complex-type.4: Attribute 'pubdate' must appear on element 'revision-report'.
    Error::cvc-complex-type.2.4.b: The content of element 'revision-report' is not complete. One of '{"http://xmlns.oracle.com/xmlfile":alternategroup}' is expected.
    Please make sure that the xml document is valid against your schemas.
    </summary>
    </part>
    </invalidVariables>
    It seems that there is some issue with the namespace, but even after trying out various combinations, I am not able to resolve this.
    Here the message schema (xsd):
    <?xml version="1.0" encoding="UTF-8" ?>
    <xs:schema elementFormDefault="qualified"
    targetNamespace="http://xmlns.oracle.com/xmlfile"
    xmlns:tns="http://xmlns.oracle.com/xmlfile"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="revision-report">
    <xs:complexType>
    <xs:sequence maxOccurs="unbounded">
    <xs:element name="alternategroup">
    <xs:complexType>
    <xs:attribute name="name" use="required" type="xs:string"/>
    <xs:attribute name="Desc" use="required" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    <xs:attribute name="doc" use="required" type="xs:string"/>
    <xs:attribute name="model" use="required" type="xs:string"/>
    <xs:attribute name="pubdate" use="required" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    And here is the xml file to be read by the file adapter:
    <?xml version="1.0" encoding="UTF-8" ?>
    <revision-report doc="doc2" model="model4" pubdate="pubdate5">
    <alternategroup Name="ABC" Desc="ABC-Desc">
    </alternategroup>
    <alternategroup Name="DEF" Desc="DEF-Desc">
    </alternategroup>
    <alternategroup Name="GHI" Desc="GHI-Desc">
    </alternategroup>
    </revision-report>
    Appreciate any help.
    Thanks in advance for your attention.
    Jay

    Thanks for your response.
    I am not sure if there is any easier way, but I tried out the following tool available on the net to check an xml against a xsd:
    http://tools.decisionsoft.com/schemaValidate/
    There were a few issues, that I corrected and finally had a xsd and xml that were matching and valid. I tried this out in my file reading BPEL process, but the error still remained the same!
    Here is my updated/simplified xsd and xml:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xs:schema targetNamespace="http://xmlns.oracle.com/xmlfile"
    xmlns:tns="http://xmlns.oracle.com/xmlfile"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://xmlns.oracle.com/xmlfile">
    <xs:element name="revision-report">
    <xs:complexType>
    <xs:sequence>
    <xs:element maxOccurs="unbounded" ref="alternategroup"/>
    </xs:sequence>
    <xs:attribute name="doc" use="required" type="xs:string"/>
    <xs:attribute name="model" use="required" type="xs:string"/>
    <xs:attribute name="pubdate" use="required" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="alternategroup">
    <xs:complexType>
    <xs:attribute name="Name" use="required" type="xs:string"/>
    <xs:attribute name="Desc" use="required" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    <?xml version="1.0" encoding="UTF-8" ?>
    <revision-report doc="doc2" model="model4" pubdate="pubdate5" xmlns="http://xmlns.oracle.com/xmlfile">
    <alternategroup Name="ABC" Desc="ABC-Desc"/>
    <alternategroup Name="DEF" Desc="DEF-Desc"/>
    <alternategroup Name="GHI" Desc="GHI-Desc"/>
    </revision-report>
    I even tried the option that is available in JDeveloper to generate a sample xml from a xsd (when in the context of a Transformation activity). The xml generated by this also seems exactly like the one above.
    So, I am not able to figure out why my BPEL process errors out with the message Invalid xml document.

  • Need Help-SOA 11g File Adapter unable to delete input file and its crashing

    Hi All
    Please find the details below:
    1. We have created a simple SOA composite to Read file from an input directory, archive the file in an archive directory using Inbound File Adapter Read
    and then use Outbound File Adapter Write to move the file to a output directory.
    2. File Adapter needs to delete the file after successful read/retrieval.
    3. We are using the "Use Trigger File" for invoking the file adapter. This is a new feature in SOA 11g
    4. Also we are using the option of reading the file as an attachment as we are not doing any transformation in the composite
    Issue Details_
    1. When the trigger file is put in the input directory for the first time, the File Adapter reads the file, archives it and moves it to the output directory
    2. However it does not delete the input file from the input directory and raises Fatal Exception mentioned below:
    [*2011-01-12T16:55:48.639+05:30] [soa_server1] [WARNING] [] [oracle.soa.adapter] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@19c243d]*
    [userId: <anonymous>] [ecid: 0000IptyLrL9_aY5TrL6ic1DBOS_000009,0] [APP: soa-infra] File Adapter FileAdapterTriggerFilePOC PostProcessor::
    Delete failed, the operation will be retried for max of [0] times
    [2011-01-12T16:55:48.639+05:30] [soa_server1] [WARNING] [] [oracle.soa.adapter] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@19c243d]
    [userId: <anonymous>] [ecid: 0000IptyLrL9_aY5TrL6ic1DBOS_000009,0] [APP: soa-infra] File Adapter FileAdapterTriggerFilePOC [[
    BINDING.JCA-11042
    File deletion failed.
    File deletion failed.
    File : C:\Dibya\AttachmentTest\InputDir\TestFile3.txt could not be deleted.
    Delete the file and restart server. Contact oracle support if error is not fixable.
    If any one has faced similar issues, kindly provide pointers on how to resolve it.
    Regards,
    Dibya

    Hi,
    Using the file adapter, you can poll from multilple locations...
    Keep the following property in your .jca file
    <property name="DirectorySeparator" value="," />
    While giving the path in File Adapter configuration, keep comma and give the next location....then the file will be picked up from the locations you gave....
    Hope this helps...
    Thanks,
    N

  • Need help with connecting file inputs to arrays

    In this assignment I have a program that will do the following: display a list of names inputed by the user in reverse order, display any names that begin with M or m, and display any names with 5 or more letters. This is all done with arrays.
    That was the fun part. The next part requires me to take the names from a Notepad file, them through the arrays and then output them to a second Notepad file.
    Here is the original program: (view in full screen so that the code doesn't get jumbled)
    import java.io.*;       //Imports the Java library
    class progB                    //Defines class
        public static void main (String[] arguments) throws IOException
            BufferedReader keyboard;                                  //<-
            InputStreamReader reader;                                 //  Allows the program to
            reader = new InputStreamReader (System.in);               //  read the the keyboard
            keyboard = new BufferedReader (reader);                  //<-
            String name;                 //Assigns the name variable which will be parsed into...
            int newnames;               //...the integer variable for the amount of names.
            int order = 0;              //The integer variable that will be used to set the array size
            String[] array;             //Dynamic array (empty)
            System.out.println (" How many names do you want to input?");   //This will get the number that will later define the array
            name = keyboard.readLine ();
            newnames = Integer.parseInt (name);                                         // Converts the String into the Integer variable
            array = new String [newnames];                                               //This defines the size of the array
            DataInput Imp = new DataInputStream (System.in);       //Allows data to be input into the array
            String temp;                                       
            int length;                                                                  //Defines the length of the array for a loop later on
                for (order = 0 ; order < newnames ; order++)                                //<-
                {                                                                           //  Takes the inputed names and
                    System.out.println (" Please input name ");                            //  gives them a number according to
                    temp = keyboard.readLine ();                                           //  the order they were inputed in
                    array [order] = temp;                                                  //<-
                for (order = newnames - 1 ; order >= 0 ; order--)                                //<-
                {                                                                                //  Outputs the names in the reverse 
                    System.out.print (" \n ");                                                   //  order that they were inputed
                    System.out.println (" Name " + order + " is " + array [order]);             //<-
                for (order = 0 ; order < newnames ; order++)                                  //<-
                    if (array [order].startsWith ("M") || array [order].startsWith ("m"))     //  Finds and outputs any and all
                    {                                                                         //  names that begin with M or m
                        System.out.print (" \n ");                                            //
                        System.out.println (array [order] + (" starts with M or m"));         //
                    }                                                                         //<-
                for (order = 0 ; order < newnames ; order++)                                            //<-
                    length = array [order].length ();                                                   //
                    if (length >= 5)                                                                    //  Finds and outputs names
                    {                                                                                  //  with 5 or more letters
                        System.out.print (" \n ");                                                      //
                        System.out.println ("Name " + array [order] + " have 5 or more letters ");      //<-
    }The notepad file contains the following names:
    jim
    laruie
    tim
    timothy
    manny
    joseph
    matty
    amanda
    I have tried various methods but the one thing that really gets me is the fact that i can't find a way to connect the names to the arrays. Opening the file with FileInputStream is easy enough but using the names and then outputing them is quite hard. (unless i'm thinking too hard and there really is a simple method)

    By "connect", do you just mean you want to put the names into an array?
    array[0] = "jim"
    array[1] = "laruie"
    and so on?
    That shouldn't be difficult at all, provided you know how to open a file for reading, and how to read a line of text from it. You can just read the line of text, put it in the array position you want, until the file is exhausted. Then open a file for writing, loop through the array, and write a line.
    What part of all that do you need help with?

  • Need help replacing a file in AE

    Ok, here is my problem, I made a project on another computer and then I transfered to my computer. I dragged all of the images and sounds but ONE very important image. I downloaded that same image from online and I need help replacing the corrupted old image with the new one. Here is a picture with more detail.
    I tried copy & pasting the layer properties and effects, but that didn't work. Any ideas?
    Thanks,
    Emal

    For instructions on swapping out a footage item's source file, "Replace layer source with reference to another footage item".

  • NEED HELP? Read this first. Also, NOODZ.

    Ok, first, noodz (caution: may not be work/school-safe*).
    Now, if you need help, follow these guidelines.
    Do your homework first.
    Many of the questions that get posted here are directly answered in the Wiki or easily found on Google or through an Arch forum search. The Latest News will sometimes address known issues too. Finally, you can check the bugtracker to see if anyone else has reported the same problem. Do some research before posting to save yourself and others time. Don't just post a problem and expect everyone else to do your work for you. Archers help those who (at least try to) help themselves.
    Use an explanatory subject title.
    Titles such as "this doesn't work, wtf???" do not help and make people roll their eyes. Try to summarize the problem in the title so someone opening the thread has an idea of what your post is about. This will also increase the chance of someone who can solve your problem finding your thread.
    Explain the problem clearly and provide detailed information.
    Again, "it's just broken" and similar "descriptions" don't tell anyone anything. Give all the relevant information that you can think of, such as the specific error that you're getting, system information (e.g. soundcards for audio problems, network setup for connection problems), when the problem started and what might have caused it, relevant logs, relevant system configuration files, etc. Include information about anything that you've tried so far to solve the problem. You can also read this extensive guide on getting help.
    Be patient and polite.
    Sometimes it takes time to get a reply. Do not bump your thread every 3 hours with messages like "come on, help me!!!". Also, don't be rude to people who misunderstand your problem or reply with suggestions that don't work. Instead, politely try to explain your problem more clearly.
    Mark the thread as [SOLVED] once you've found a solution.
    Once you've found the solution, edit your original post and add "[SOLVED]" to the beginning of the subject title. This way others with similar problems will be able to find the solution faster.
    @mods
    This is my suggested consolidation and replacement of the following stickies:
    http://bbs.archlinux.org/viewtopic.php?id=16152
    http://bbs.archlinux.org/viewtopic.php?id=50160
    http://bbs.archlinux.org/viewtopic.php?id=50161
    *actually, it's a joke in response to Mr. Elendig's comment and it's perfectly worksafe
    Last edited by Xyne (2008-11-15 14:25:33)

    tomk wrote:
    Thanks for the suggestion, we'll have a look at it.
    Tip for the future - if you want to make effective contributions, it would be better not to include random links to pages that may not be work/school-safe. Whatever merit your suggestion may have has been completely undermined by this unnecessary nonsense, which clearly belongs in the Off-topic area.
    Um, it's a joke. If you check the link, you'll find a wikipedia page.
    EDIT: The joke is a direct response to Mr. Elendig's post and my reply to it here: http://bbs.archlinux.org/viewtopic.php?id=50161
    Last edited by Xyne (2008-11-15 14:12:54)

  • Need help with copying files onto external drive

    I need help! Trying to copy downloaded movie files from Vuze (which have downloaded successfully) and copy onto external hard drive to view them but it wont let me copy over to the external device. Any ideas how to fix this please???

    Can you explain the steps you used, and the error message (or symptom), that says the copy did not work? 

  • I need help retrieving Microsoft files lost when upgrading to OSX Mavericks

    My daughter recently upgraded our Mac to the OSX Mavericks platform. Unfortunately, all of our Microsoft files, etc. are gone! I need to know how I can retrieve these files or if I can. I'm honestly not impressed with this new platform. I need help asap and your help is truly appreciated.

    You have to make the backup yourself. That's your only protection against file loss whether accidental or catastrophic. In fact you should have at least two of them - each done differently and on separate drives.
    If your files truly were "erased" then you can see if they can be recovered:
    General File Recovery
    If you stop using the drive it's possible to recover deleted files that have not been overwritten by using recovery software such as MAC Data Recovery, Data Rescue II, File Salvage or TechTool Pro.  Each of the preceding come on bootable CDs to enable usage without risk of writing more data to the hard drive.  Two free alternatives are Disk Drill and TestDisk.  Look for them and demos at MacUpdate or CNET Downloads. Recovery software usually provide trial versions that enable you to determine if the software would help before actually paying for it. Beyond this or if the drive has completely failed, then you would need to send the drive to a recovery service which is very expensive.
    The longer the hard drive remains in use and data are written to it, the greater the risk your deleted files will be overwritten.
    Also visit The XLab FAQs and read the FAQ on Data Recovery.
    Basic Backup
    For some people Time Machine will be more than adequate. Time Machine is part of OS X. There are two components:
    1. A Time Machine preferences panel as part of System Preferences;
    2. A Time Machine application located in the Applications folder. It is
         used to manage backups and to restore backups. Time Machine
         requires a backup drive that is at least twice the capacity of the
         drive being backed up.
    3. Time Machine requires a backup drive that is at least double the
         capacity of the drive(s) it backs up.
    Alternatively, get an external drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
      1. Carbon Copy Cloner
      2. Get Backup
      3. Deja Vu
      4. SuperDuper!
      5. Synk Pro
      6. Tri-Backup
    Visit The XLab FAQs and read the FAQ on backup and restore.  Also read How to Back Up and Restore Your Files. For help with using Time Machine visit Pondini's Time Machine FAQ for help with all things Time Machine.
    Although you can buy a complete external drive system, you can also put one together if you are so inclined.  It's relatively easy and only requires a Phillips head screwdriver (typically.)  You can purchase hard drives separately.  This gives you an opportunity to shop for the best prices on a hard drive of your choice.  Reliable brands include Seagate, Hitachi, Western Digital, Toshiba, and Fujitsu.  You can find reviews and benchmarks on many drives at Storage Review.
    Enclosures for FireWire and USB are readily available.  You can find only FireWire enclosures, only USB enclosures, and enclosures that feature multiple ports.  I would stress getting enclosures that use the Oxford chipsets especially for Firewire drives (911, 921, 922, for example.)  You can find enclosures at places such as;
      1. Cool Drives
      2. OWC
      3. WiebeTech
      4. Firewire Direct
      5. California Drives
      6. NewEgg
    All you need do is remove a case cover, mount the hard drive in the enclosure and connect the cables, then re-attach the case cover.  Usually the only tool required is a small or medium Phillips screwdriver.

  • Need Help in reading data from URLConnection in servlets

    hi i created GUI which sends d username n password to the servlets via URLConnection.n am sending the same to Server program via sockets.but when i read d data in the servlet am getting only null value...need help here....
    This is my button's ActionPerformed code
    private void LoginActionPerformed(java.awt.event.ActionEvent evt) {
    String uname = UserName.getText();
    char [] pwd = PassWord.getPassword();
    String pword = new String(pwd);
    try
    String url = "http://localhost:8080/MIMServlets/hit";
    URL ucon = new URL(url);
    URLConnection conn = ucon.openConnection();
    conn.setDoOutput(true);
    conn.setDoInput(true);
              conn.setUseCaches (false);
    conn.setDefaultUseCaches (false);
    conn.setRequestProperty("Content-Type", "text/plain");
    System.out.println(uname);
         System.out.println(pword);
         PrintWriter out = new PrintWriter( conn.getOutputStream() );
    BufferedReader in = new BufferedReader(
    new InputStreamReader(
    conn.getInputStream()));
         out.print(uname);
    out.print(pword);
         out.close();
    String inputLine = in.readLine();
    Status.setText(inputLine);// TODO add your handling code here:
    }catch(MalformedURLException e)
    System.out.println("Exception"+e);
    catch(IOException e1)
    System.out.println("Exception"+e1);
    This is my Servlet code........
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class MIMServlets extends HttpServlet
    PrintWriter out,out1;
         BufferedReader in,in1;
         String host = "localhost";
         String fromServer = "";
         String username,password;
         int a;
         public void init()
    out=null;
    out1=null;
    public void doPost(HttpServletRequest request,HttpServletResponse
                   response)throws ServletException,IOException
              response.setContentType("text/html");
              out=response.getWriter();
              try{
              InetAddress address = InetAddress.getByName(host);
    Socket theSocket = new Socket(address, 4444);
    out1 = new PrintWriter(theSocket.getOutputStream(),true);
    in = new BufferedReader(new InputStreamReader(theSocket.getInputStream()));
    in1 = new BufferedReader(new InputStreamReader(request.getInputStream()));
              String username = in1.readLine();
              String password = in1.readLine();
    System.out.println(username);
              System.out.println(password);
    out1.println(username);
              out1.println(password);
              out1.println("Yahoo");
              out1.flush();
    while ((fromServer = in.readLine()) != null)
    out.println("From Server: " + fromServer);
              break;
         out1.close();
    in.close();
    theSocket.close();
         }catch(IOException e)
    System.out.println("Exception");
    System.exit(-1);
              public void destroy()
         out.close();
    thanks in advance.......

    Follow below example to using FM 'READ_TEXT'
    DATA  BEGIN OF i_tlines OCCURS 0.
            INCLUDE STRUCTURE tline.
    DATA  END   OF i_tlines.
    DATA: w_textname(70) TYPE c.
      w_textname = vbdkr-vbeln.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          client                        = sy-mandt
          id                            = 'Z006'
          language                      = 'E'
          name                          = w_textname
          object                        = 'VBBK'
        TABLES
          lines                         = i_tlines.
      IF sy-subrc = 0.
        READ TABLE i_tlines INDEX 1.
        t_in-m1 = i_tlines-tdline.   "Now t_in_m1 will have the value
      ENDIF.
    Regards,
    SaiRam

  • I need help with viewing files from the external hard drive on Mac

    I own a 2010 mac pro 13' and using OS X 10.9.2(current version). The issue that I am in need of help is with my external hard drive.
    I am a photographer so It's safe and convinent to store pictures in my external hard drive.
    I have 1TB external hard drive and I've been using for about a year and never dropped it or didn't do any thing to harm the hardware.
    Today as always I connected the ext-hard drive to my mac and click on the icon.
    All of my pictures and files are gone accept one folder that has program.
    So I pulled up the external hard drive's info it says the date is still there, but somehow i can not view them in the finder.
    I really need help how to fix this issue!

    you have a notebook, there is a different forum.
    redundancy for files AND backups, and even cloud services
    so a reboot with shift key and verify? Recovery mode
    but two or more drives.
    a backup, a new data drive, a drive for recovery using Data Rescue III
    A drive can fail and usually not if, only when
    and is it bus powered or not

  • Need help in setting file name with special characters in attachment

    Hi
    We have a requirement where we need to set the file name that contains special characters (like Russian) and send mauil using Java mail.
    If we set the file name as such, the attachment in the email contains garbled filename
    Can you pl let me know how to resolve this?
    We should use the file name as attachment name and this will have say special characters. The receiver who gets the mail should get with the correct attachment name
    One important point.. the attachments are opened from MS outlook.
    Thanks and regards
    Ram
    Edited by: 884910 on 13 Sep, 2011 5:00 AM

    Read the FAQ carefully. You don't need to call encodeText unless you're using a really
    old version of JavaMail.
    And, it depends on whether the mail reader you're using is handling encoded parameters
    according to the (new) MIME standard, or according to the (old) non-standard hack.
    Sadly, without knowing what mail reader the recipient is using, it's impossible to use
    encoded filenames that will work everywhere.

  • Need help displaying HTML files stored in content repository

    I have a very simple HTML file stored in a binary attribute (so the file could
    be uploaded through the Admin Portal) named "html" in the BEA Repository (8.1sp2)
    and would like to display it in a JSP. Here's a snippet from that JSP:
    <cm:getNode path="<%=myNodePath%>" id="myNode"/>
    <cm:getProperty node="<%=myNode%>" name="html" conversionType="html"/>
    I expected the getProperty tag to fetch the HTML file and render it inline, but
    I guess that's wishful thinking. Am I missing something?
    Thanks for any help!

    I added transactionTimeout="30" to the tag shown below. That did the trick, as
    long as I avoided certain combinations of tag attributes. Guess this one's a little
    moody.
    Thanks, Greg.
    Gregory Smith <[email protected]> wrote:
    Try setting the transactionTimeout to something greater than 0 on the
    <cm:getProperty> tag.
    Greg
    Marc N wrote:
    I have a very simple HTML file stored in a binary attribute (so thefile could
    be uploaded through the Admin Portal) named "html" in the BEA Repository(8.1sp2)
    and would like to display it in a JSP. Here's a snippet from that JSP:
    <cm:getNode path="<%=myNodePath%>" id="myNode"/>
    <cm:getProperty node="<%=myNode%>" name="html" conversionType="html"/>
    I expected the getProperty tag to fetch the HTML file and render itinline, but
    I guess that's wishful thinking. Am I missing something?
    Thanks for any help!

Maybe you are looking for

  • How to include hardware configuration in the installer?

    I have a VI developed with LabVIEW 2009 V9.0f2 using a USB-6009 and two of its analog inputs.  The VI uses the DAQ Assistant to configure the USB-6009.  I include the DAQmx Core Runtime 9.0.2 with the LabVIEW Runtime Engine 2009 in the installer buil

  • Scale base value calculation ( Pricing!!)

    Hello, I have issue, when I am creating a credit memo request (Va01 – order type is customized) with reference to billing document. All the items and prices are copied properly. But the scale base value is not copied properly. In the credit memo requ

  • BOE indexing within KM in SAP EP

    Hi, when configuring the KM integration one has to specify a user for indexing and subscription. Is it possible to generate an index of BOBJ content using TREX? Further, is it possible to leverage BOBJ folder and object security when accessing these

  • IPad Photo Sync never ends....

    Hi there, I tried syncing a folder containing several thousand photos a while ago and then cancelled the sync without letting it finish. Since then I cannot sync any photos onto my iPad, even folders containing only a few photos. The itunes sync just

  • Locked iPhone5 from UK, now in Finland

    My mother bought an i Phone 5 in the UK, but she passed away 2 months ago. I travelled from Finland to empty her house and brought the phone back to Finland with me. I can't get the phone to work with my finnish operator sim card (even though i order