How to read from untrusted https connection?

i try to read the content of a https URL but when calling httpsurl.getContent() or con.getInputStream() i get the following exception:
javax.net.ssl.SSLException: untrusted server cert chain
     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
     at com.sun.net.ssl.internal.ssl.ClientHandshaker.a(DashoA6275)
     at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(DashoA6275)
     at com.sun.net.ssl.internal.ssl.Handshaker.process_record(DashoA6275)
     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
     at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
     at java.io.OutputStream.write(OutputStream.java:56)
     at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
     at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.doConnect(DashoA6275)
     at com.sun.net.ssl.internal.www.protocol.https.NetworkClient.openServer(DashoA6275)
     at com.sun.net.ssl.internal.www.protocol.https.HttpClient.l(DashoA6275)
     at com.sun.net.ssl.internal.www.protocol.https.HttpClient.<init>(DashoA6275)
     at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.<init>(DashoA6275)
     at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a(DashoA6275)
     at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a(DashoA6275)
     at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connect(DashoA6275)
     at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.getInputStream(DashoA6275)
the same https url works in internet explorer although a little dialog appears that informs about the untrusted certificate, but i can click O.K. and get the content. How can i tell my java application that it should read the content of such an untrusted server?

I am recyling this for OTT purposes..
Continuing on 360-degree feedback, here is a managerial take on it:
Q: What is a 360-degree feedback?
Manager: You give me open and honest opinions about my performance. Then I take it all on board and do absolutely nothing. If it but worketh, thou may even be introduced to a concept called wages.

Similar Messages

  • How to read from UDP ??

    Hello,
       I have a device which sends MPEG2 multicast udp live stream, I can read it from udp://@236.1.1.14:34000 for instance. Next it is transcoded with vlc :
    cvlc -vvv udp://@236.1.1.14:34000 --sout \
            "#transcode{venc=x264{keyint=60,profile=baseline,level=3.0,nocabac},vcodec=x264,vb=250,sc ale=0.6,acodec=mp4a,ab=96,channels=2,samplerate=48000}:rtp{dst=127.0.0.1,port=10013,mux=ts }" 2>1 > /dev/null &
    My question is how to read from udp://@127.0.0.1:10013 using FMS and send it to flash clients ?
    Thank you

    Hi Nikhil,
        Thank you for the response. But what kind of streams can I feed into FMS input ? VLC supports other types of output, HTTP for example

  • How to read from text file?

    I would like to read data (frequencies) already written in a text file. I will need read these frequencies one at a time to set the function generator (as part of my data acquisition application), acquire data that is in turn written to a file and then go back and read the next frequency from the file to repeat the process again. I also have another idea of doing the same, which is read all the frequencies from the text file and populate a table and a frequency value is picked from the table each time to go through the process mentioned above.
    Can anyone suggest the following: (1) How to read from a text file, (2) What could be the most efficient way of solving my above problem.
    I am a new LabVIEW user and any help will be appreciated.

    Hi Research,
    Depending on the format of the data file, there are a few options for reading it.  If it is tab delimited, you may want to use the Read from SpreadSheet File VI which will read the file into an Array.  You can then use the Index Array VI to pull out individual entries.  If the files is ASCII but not tab delimited, you could use the regular Open File and Read File VIs.  You can either read the file out piece by piece, or read the entire file into a string and then use the Match Pattern VI to parse out the different elements (there are actually many ways to do this - check out the Strings subpalette). 
    Since you're new to LabVIEW, you may want to check out these resources:
    Three Hour Introduction to LabVIEW
    Six Hour Introduction to LabVIEW
    Getting Started with LabVIEW
    I hope this helps!  Let us know if you have more questions,
    Megan B.
    National Instruments

  • Read from socket failed: Connection reset by peer

    On Solaris 10 SPARC I have NO problem with establishing SSH connections.
    Here is proof:
    # svcs -a | grep ssh
    online Jun_02 svc:/network/ssh:default...but here is what can be found in /var/adm/messages
    Jun 7 04:09:16 my_host sshd[11701]: [ID 800047 auth.crit] fatal: Read from socket failed: Connection reset by peerTHIS IS IMPORTANT!!!
    This messages does not appear during I establish my ssh connection. It appears irregular.
    Does anyone know whats going on ?

    Hi Darren,
    that would make sense but I just made a test:
    I have opened tail -f /var/adm/messages and from other host:
    - telnet to it on port 22 - no message
    - closed client during establishing connection - still no message
    But I belive you must be right as I see no other possibility...
    Can I turn on more detailed logger in message to be able to see IP address of all host who are trying SSH connection ?
    Edited by: czezz on Jun 25, 2009 10:50 PM

  • How to read from properties file

    Hi,
    I am using JSR 168.
    while creating a new portlet, a folder gets created with the name as "portlet". Under which is resource package and <PortletName>Bundle.java.
    pls tell me how to read from .properties file.
    waiting eagerly for some reply
    Thanks & Regards,
    HP
    Edited by: user9003827 on Apr 13, 2010 3:42 AM

    I think i have mixed it up :)
    I have looked at it again and believe you are using regular JSP portlets.
    Can you tell what you want to achieve by reading .properties file. Are you meaning the preferences of the portlet or what exactly are you trying to do?
    Reading propertie files is easy:
    // Read properties file.
    Properties properties = new Properties();
    try {
        properties.load(new FileInputStream("filename.properties"));
        String myKey = properties.getProperty("yourKey");
    } catch (IOException e) {
    }Edited by: Yannick.O on 13-Apr-2010 05:52

  • How to Read from Standard Input?

    Hi,
    I am new to Java. Been reading the tutorial, but still unable to find How to read from standard Input.
    Can anyone help? Thanks.
    Here is my simple & error code:
    public class test
    public static void main(String[] args)
    char filename[];
    int i=0;
    System.out.print("Type in a filename to read: ");
    while ( System.in(filename) != -1 )
    i++;
    System.out.print(filename);
    RP

    import java.io.*;
    public class forum{
         public static void main(String args[]) throws IOException
    InputStreamReader is = new InputStreamReader(System.in);
    BufferedReader br = new BufferedReader(is);
    String input = "";
    do
    try
    System.out.println("Enter command: ");
    input = br.readLine();
    catch ( IOException io ) {}
    } while (!input.equals("exit"));
    [code\]
    package to import is java.io.*;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to read from file just the 2nd line onwards?

    hi guys can anyone help me?
    how to read from the file if the file was like this
    2 2
    2 1
    1 3
    and i want to get the 2 1 ,just the 2nd line and the 3rd line?
    i tried using the string tokenizer but it kept saying
    no such element
    i tried this code:
    StringTokenizer cols = new StringTokenizer(s," ");
         temp =  (String) (cols.nextElement());
         num_rows = Integer.parseInt(temp);
         temp = (String) (cols.nextElement());
         num_cols = Integer.parseInt(temp);
         matrix = new int [num_rows][num_cols];
         // to add all the values in the data file into an array                         
         while ( s!= null ) {
         StringTokenizer st1 = new StringTokenizer (s);
               while (st1.hasMoreTokens()){
                     for (i=0; i<num_rows; i++){
                          for (j=0; j<num_cols; j++)
                             matrix[i][j] = Integer.parseInt
                                ( st1.nextToken());
                } // whilecan anyone please help me?
    thanks

    This will read the file witout the first line:
    import java.io.*;
    import java.util.*;
    public class Read2
    public static void main (String[] args)
         try
              FileReader     file = new FileReader("f.txt");
              BufferedReader buff = new BufferedReader(file);
              String         line  = buff.readLine();
              while (line != null)
                   line = buff.readLine();
                   System.out.println(line);
              buff.close();
         catch(IOException e)
              System.out.println("IO Error");
    }       Noah

  • How to read from 4 serial ports

    Hi
    Does anyone know how to read from 4 COM ports with only 2 interupts? I can
    manage it by using Close serial driver.vi, however this makes the amount of
    allocated memory by Labview increase throughout my experiment and thereby
    slows down the computer. I use Labview 4.0.1 on Win95.
    Regards
    Frede Lei

    Hi,
    Thanks for the reply however I could able to write the PCR to read one variable without wagetype. My question is, I have 6 variables in VAR table and now I want to read all the variable and based on the variable I need to create the 6 wagetype each for each variable.
    I know to create the wagetype with one variable.
    ZSSB CCE : restore 7SSB wage types paid separately in RT       
            AMT=& VSSB Set                                         
            AMT?0      Comparison                                  
                ADDWTI7SSB IT   Input table                        
              =                                                    
    However, how I could create the only 1 PCR for 6 variable?
    regards,
    Saurabh Garg

  • Play audio from internet -http connection-

    Hi friends,
    I have made an audio player using jmf as part of my project.It can play files from local machine as well as local network in my company. But i don't know how to play audio files like wav,mp3 from internet using http connection as described by tristanlee85. Can anyone explain me how to accomplish this.
    The code where i tried to
    access http connection is given below.
    But it is not working.I know Streaming is necessary. But how to do it in jmf. What imports are needed.Please guide me
    Manu
    import javax.media.*;
    import java.text.DecimalFormat;
    import java.awt.*;
    import java.awt.FileDialog;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    <APPLET CODE=PlayerApplet.class
    WIDTH=320 HEIGHT=300>
    </APPLET>
    class nwa extends WindowAdapter
         frameclass frame;
         Player player;
         public nwa(frameclass frame,Player player)
          this.player=player;
          this.frame=frame;
         public void windowClosing (WindowEvent e)
          //User selected close from System menu.
          //Call dispose to invoke windowClosed.
          frame.dispose ();
          public void windowClosed (WindowEvent e)
              if (player != null)
                   player.stop();
                player.close ();
                   player.deallocate();
          System.exit (0);
    class frameclass extends JFrame
    Player player;
         frameclass(Player player)
         nwa n=new nwa(this,player);
         this.addWindowListener(n);                    
    public class PlayerApplet extends JApplet
               implements ActionListener,ControllerListener,ItemListener, KeyListener
               Player player=null;
               frameclass frame=new frameclass(player);
                 Component vc, cc;
                 Container f;
                 JProgressBar volumeBar;
                 JButton fastRewind;
              JButton fastForward;
              JButton play;
              int sizeIncrease = 2;
              boolean invokedStop = false;
              /** Big */
              int progressFontSize=30;
                 boolean first = true, loop = false;
                 String currentDirectory;
                 public void init()
                          f=frame.getContentPane();
                         JMenu m = new JMenu ("File");
                         JMenuItem mi = new JMenuItem ("Open...");
                         mi.addActionListener (this);
                         m.add (mi);
                         m.addSeparator ();
                         mi = new JMenuItem ("URL");
                         mi.addActionListener (this);
                         m.add (mi);
                         m.addSeparator ();
                         JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem ("Loop", false);
                         cbmi.addItemListener (this);
                         m.add (cbmi);
                         m.addSeparator ();
                         mi = new JMenuItem ("Exit");
                         mi.addActionListener (this);
                         m.add (mi);
                         JMenuBar mb = new JMenuBar ();
                         mb.add (m);
                         frame.setJMenuBar (mb);
                         setSize (500, 500);
                           JPanel p = new JPanel(new GridLayout(1,0,5,5));
                        p.setBorder(new EmptyBorder(3,5,5,5) );
                        fastRewind = new JButton("<html><body><font size=+"+ sizeIncrease+ "><<");
                        fastRewind.setToolTipText("Fast Rewind");
                        fastRewind.addActionListener( new ActionListener(){
                             public void actionPerformed(ActionEvent ae) {
                                  if (player!=null) {
                                       invokedStop = false;
                                       skipBack();
                                  } else {
                                       JOptionPane.showMessageDialog(play,
                                       new JLabel("Open a sound file first!"));
                        fastRewind.addKeyListener(this);
                        p.add(fastRewind);
                        JButton stop = new JButton("<html><body><font size=+"+ sizeIncrease+ ">��");
                        stop.setToolTipText("Stop");
                        stop.addActionListener( new ActionListener(){
                                  public void actionPerformed(ActionEvent ae) {
                                       invokedStop = true;
                                       sp();
                        stop.addKeyListener(this);
                        p.add(stop);
                        play = new JButton("<html><body><font size=+"+ sizeIncrease+ ">>");
                        play.setToolTipText("Play");
                        play.addActionListener( new ActionListener()
                                  public void actionPerformed(ActionEvent ae) {
                                       if (player!=null) {
                                            invokedStop = false;
                                            player.setRate(1);
                                            st();
                                       } else {
                                            JOptionPane.showMessageDialog(play,
                                            new JLabel("Open a sound file first!"));
              play.addKeyListener(this);
              p.add(play);
              fastForward = new JButton("<html><body><font size=+"+ sizeIncrease+ ">>>");
              fastForward.setToolTipText("Fast Forward");
              fastForward.addActionListener( new ActionListener(){
                   public void actionPerformed(ActionEvent ae) {
                        if (player!=null) {
                             invokedStop = false;
                             skipForward();
                        } else {
                             JOptionPane.showMessageDialog(play,
                             new JLabel("Open a sound file first!"));
              fastForward.addKeyListener(this);
              p.add(fastForward);
              frame.getContentPane().add(p,BorderLayout.CENTER);
              frame.setVisible (true);
              frame.pack();
              frame.setResizable(false);
      public void stop(){
      sp();
      public void destroy(){
       player.stop();
        player.deallocate();
      public void actionPerformed (ActionEvent e)
              if (e.getActionCommand().equals("Exit"))
                             // Call dispose to invoke windowClosed.
                             player.stop();
                             player.close();
                             player.deallocate();
                             frame.dispose ();
                                  return;
    // Play file from local machine
              if (e.getActionCommand().equals("Open..."))
                             FileDialog fd = new FileDialog (frame, "Open File",
                                         FileDialog.LOAD);
                              fd.setDirectory (currentDirectory);
                              fd.show ();
                              // If user cancelled, exit.
                              if (fd.getFile() == null)
                             return;
                              currentDirectory = fd.getDirectory ();
                                   if (player != null){
                                       player.close ();
                                       player.deallocate();
                         try
                  player = Manager.createPlayer (new MediaLocator
                                               ("file:" +
                                               fd.getDirectory() +
                                               fd.getFile()));
                              catch (java.io.IOException e2)
                            System.out.println ("file not found :"+e2);
                            return;
                              catch (NoPlayerException e2)
                            System.out.println ("Could not find a player.");
                            return;
                    if (player == null)
                   System.out.println ("Trouble creating a player.");
                   return;
                    first = false;
                    frame.setTitle (fd.getFile ().toString());
                    player.addControllerListener (this);
                    player.prefetch ();
                   return;
    // Play file from internet
    if (e.getActionCommand().equals("URL"))
                              if (player != null){
                                       player.close ();
                                       player.deallocate();
                   try
                        URL url = new URL ("http://www.plastikhosting.net/uploads/tristanlee85/music/02-hellyeah-you_wouldnt_know.mp3");
                    MediaLocator mediaLocator = new MediaLocator (url);
                        player = Manager.createPlayer (mediaLocator);
                   catch (java.io.IOException e2)
                  System.out.println ("file not found :"+e2);
                  return;
                    catch (NoPlayerException e2)
                  System.out.println ("Could not find a player.");
                  return;
                    if (player == null)
                   System.out.println ("Trouble creating a player.");
                   return;
          first = false;
          player.addControllerListener (this);
          player.prefetch ();
              player.start ();
              return;
       public void controllerUpdate (ControllerEvent e)
          if (e instanceof ControllerClosedEvent)
              if (vc != null)
                  frame.getContentPane().remove (vc);
                  vc = null;
              if (cc != null)
                  frame.getContentPane().remove (cc);
                  cc = null;
              return;
          if (e instanceof EndOfMediaEvent)
              if (loop)
                  player.setMediaTime (new Time (0));
                  player.start ();
              return;
          if (e instanceof PrefetchCompleteEvent)
              player.start();
              return;
          if (e instanceof RealizeCompleteEvent)
            if (vc != null)
                  remove (vc);
                  vc = null;
              if (cc != null)
                  remove (cc);
                  cc = null;
              vc = player.getVisualComponent ();
              if (vc != null)
                  frame.getContentPane().add(vc,BorderLayout.NORTH);
              cc = player.getControlPanelComponent ();
              if (cc != null){
                       frame.getContentPane().add (cc, BorderLayout.SOUTH);
                     frame.setVisible(true);
                     frame.pack();
                      return;
    public void keyReleased(KeyEvent ke) {
    public void keyTyped(KeyEvent ke) {
    /*public void keyReleased(KeyEvent ke) {
    int keycode = ke.getKeyCode();
              if (keycode==KeyEvent.VK_LEFT) {
                   skipBack();
              } else if (keycode==KeyEvent.VK_RIGHT) {
                   skipForward();
         /*public void keyTyped(KeyEvent ke) {
         int keycode = ke.getKeyCode();
              if (keycode==KeyEvent.VK_LEFT) {
                   skipBack();
              } else if (keycode==KeyEvent.VK_RIGHT) {
                   skipForward();
         public void keyPressed(KeyEvent ke) {
              int keycode = ke.getKeyCode();
              if (keycode==KeyEvent.VK_LEFT) {
                   skipBack();
              } else if (keycode==KeyEvent.VK_RIGHT) {
                   skipForward();
              }else if (keycode==KeyEvent.VK_UP) {
                   st();
              }else if (keycode==KeyEvent.VK_DOWN) {
                   sp();
    public void skipForward() {
    Time settime;
    double secs=5;
    double playersecs = player.getMediaTime().getSeconds();
    double duration = player.getDuration().getSeconds();
              if((playersecs+secs) < duration){
                      settime = new javax.media.Time(playersecs + secs);
                      player.setMediaTime(settime);
              }else {
                        player.setMediaTime(new Time(duration));
    public void skipBack() {
              double secs1=5;
              double secs2=0;
              double playersecs1 = player.getMediaTime().getSeconds();
              Time settime1;
              if((playersecs1 - secs1) > secs2){
                      settime1 = new javax.media.Time(playersecs1 - secs1);
                      player.setMediaTime(settime1);
              }else {
                        player.setMediaTime(new Time(0));
         public void st() {
         player.start();
         public void sp() {
         player.stop();
       public void itemStateChanged (ItemEvent e)
          loop = !loop;
    }

    Thank u Thompson For your kind reply. I got the problem solved. It was the the problem of Untrusted Applet as u said.Now i Have signed my applet and this appletplayer plays audio only from the server from where this applet comes and from the localmachine also.Now it is playing fine from the server.
    But i have another problem , If i am asking that in the wrong forum plz forgive, I will ask it it in applet forum also.
    Problem is , I have implemented a joystick with this player. The idea is to combine this player with a text editor so that user can hear audio at the same time he can type in the editor what he hear and he can rewind and forward using joystick(It is actually a footswitch controller) with his leg. This driver i got from Source forgenet works fine in my localmachine and localnetwork also.But i have to install .DLL file in every client machine. This should be avoided.When a client having no jmf and joystick in his machine tries to run this applet through the browser the required Joystick driver and jmf must be installed in client computer also.
    By signing the applet and using ARCHIVE keyword i think jmf part will be ok but what about joystick driver.How i could install it in client machine.Playerapplet throws jjstck.dll not found exception
    plz guide me
    manu

  • Reading from CEP http channel

    How we can read from a CEP subscribed http channel through a servlet?

    yes my application will be hosted by IBM in certain environment...and the URL i am going to call through AJAX is in another domain..
    thing is...sometime i'll get the page but not the js and css for the external domain URL....
    where as i received an input from my archietect that if i make HTTP Socket connection with that URL and specify the allotted port number as well...then we are making the call from a valid connection channel...and that will make the content come back to me....with js and css...
    not sure still how it will differ from direct URL call.
    is that what you are lookign for?

  • How to solve Error in http connection. Error -1

    urlMidlet2===http://localhost:8080/testProj?userId=20&selMPBL=23&svMPBL=IPOD+Touch+Screen+e!1!Tue+Jan+06+00:00:00+UTC+2009!Tue+Jan+06+00:00:00+UTC+2009!Sat+Jan+31+00:00:00+UTC+2009!Mp3+Player!IPOD!Rejected!12
    [j2mepolish] Generic/DefaultColorPhone: !1!2!1222!13333
    [j2mepolish] Generic/DefaultColorPhone: Protocol for this connection is http
    [j2mepolish] Generic/DefaultColorPhone: This object is connected to localhost host
    [j2mepolish] Generic/DefaultColorPhone: HTTP Port in use is 8080
    [j2mepolish] Generic/DefaultColorPhone: respCode=====-1
    [j2mepolish] Generic/DefaultColorPhone: Error in opening HTTP Connection. Error#-1
    Why is this error coming? How to solve it?
    Thanks in advance.
    Edited by: J2me_Beginner on Jun 7, 2009 9:38 PM

    I am making a form using an interface. When Activate the Form, I got this error:
    Invalid HTTP connection: ADS
    Message no. FPRUN000
    But I do not know how to solve or config ADS. Any one know how to slove this error ?
    Thanks a lot.

  • How to read from and write into the same file from multiple threads?

    I need to read from and write into a same file multiple threads.
    How can we do that without any data contamination.
    Can u please provide coding for this type of task.
    Thanks in advance.

    Assuming you are using RandomAccessFile, you can use the locking functionality in the Java NIO library to lock sections of a file that you are reading/writing from each thread (or process).
    If you can't use NIO, and all your threads are in the same application, you can create your own in-process locking mechanism that each thread uses prior to accessing the file. That would take some development, and the OS already has the capability, so using NIO is the best way to go if you can use JDK 1.4 or higher.
    - K
    I need to read from and write into a same file
    multiple threads.
    How can we do that without any data contamination.
    Can u please provide coding for this type of task.
    Thanks in advance.

  • How to read from MS  Excel file ?

    Which is the best way to read from a MS Excel file ?
    I need to read both "column-wise" and "row-wise".
    Is there any free software or java api which does this. I have come across some paid softwares which do that, but i would prefer using something which is free.
    I have tried using the "save as" option to save as tab delimited, comma delimited, unicode text ... but they raise too many exceptions, and cannot be read as we read a normal text file.
    Please do suggest.
    Thanks.

    http://forum.java.sun.com/thread.jsp?forum=31&thread=289935
    http://forum.java.sun.com/thread.jsp?forum=4&thread=285062
    If you would search of the forums, you would find these two threads, and probably many others. They not only include pointers to what you ask but discussions of the pros and cons among various solutions.
    /Mel

  • How to read from a certain location is a file?

    hi! i am new to programing and i have a problems abt reading from a file. i have write the following to a file using FmtFile :
    10 (a numbers)
    name,phone,product (some strings)
    9 (a numbers)
    when i user ScanFile to read the second number(9 in the above example), i got a wrong value. the command i use is:
    ScanFile (filehandle, "%d", &number1);
    ScanFile (filehandle, "%s[t44]%s[t44]%s",name, phone product);
    ScanFile (filehandle, "%d", &number2);
    number1 and number 2 are integers and name, phone and product are char arrays.
    can anyone tell me where have i gone wrong? or maybe someone can tell me how can i read the 2nd number without reading the 1st number
    and the strings.

    Let's look at your file: if I correctly interpret your question, one row in it should like like this:
    10,name,phone,product,9
    In this case you could use the following formatting string to read all data from the string:
    "%d[x]%s[xt44]%s[xt44]%s[xt44]%d"
    [x] means to discard terminator, in order to read from strings, for example, "name" and not "name,". It's important in this case to put ALL field separators.
    Maybe your problem is that in the file you don't have separators between strings and numbers: in this case the last "%s" should read the '9' inside the last string and the subsequent "%d" matches with incorrect area in the file (end-of-line or next row).
    Hope this help
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to read from a file line by line

    Hi
    I am new to using LabView and was wondering how I could read data from a text file one line at a time and display this data one line at a time as well. I tried looking through the Reading from Text File . vi example but that just seems to be reading and displaying everything together.
    Thanks
    -Karan

    Hi
    My aim is to read text line by line and to then go ahead and display the last 8 reaad lines of code to give the impression of text falling down a screen. I tested the first while loop and that seemed to work fine. However, when I encounter an EOF, I would like the text already read to keep making its way down the screen and keep inputting NULL characters into the array to simulate the effect of the text falling down the screen which is why I created the second while loop. I tried to input the NULL characters using a box for ENUM constants. However, I kept getting an error saying the data types do not match. What would I need to do? For the display I plan on putting indicators next to the 8 places where the text would be stored which I have not done so far.
    I am also attaching a copy of the error.
    Thanks
    -Karan
    Attachments:
    DisplayText.vi ‏40 KB
    Error.JPG ‏89 KB
    PictureOfBlock.JPG ‏120 KB

Maybe you are looking for