Results 1 to 2 of 2
  1. #1
    balaji csc is offline Member
    Join Date
    Nov 2009
    Posts
    10
    Rep Power
    0

    Default Reg: Reading Files from Text file

    Hi,
    Pls guide me
    My requriment is to display Null pointer Exception and Log Entry Lines.I displayed null pointer exception using
    below coding .


    Text Files Look Like:

    Log Entry-- Date and Time

    Excpetion: Null pointer Exception

    Log Entry-- Date and Time



    --->1 Line Log Entry-- Date and Time
    ---> 2
    --->3 Line Line Excpetion: Stack overflow exception
    ---> 4
    --->5 Line Log Entry-- Date and Time



    Log Entry-- Date and Time

    Excpetion: Null pointer Exception

    Log Entry-- Date and Time.



    while(stringvalue=reading line by line!=null )
    {
    if(stringvalue.contains("Null pointer Exceptions"))
    {
    S.O.P(stringvalue);
    }
    }

    How to Display Log entry and Null pointer Exception Log Entry Lines
    Last edited by balaji csc; 11-10-2009 at 12:25 PM. Reason: For Bold option

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Look like your record consists of three lines then. You thus could readLine three times storing the values in some variables before you do the S.O.P.

Similar Threads

  1. Reading In Text Files
    By Dukey in forum New To Java
    Replies: 4
    Last Post: 04-05-2009, 12:53 AM
  2. Reading and Writing Text Files
    By kandt in forum New To Java
    Replies: 1
    Last Post: 11-12-2008, 04:15 AM
  3. Does OS intervene when reading Java text files
    By Tina G in forum Advanced Java
    Replies: 1
    Last Post: 04-07-2008, 03:29 PM
  4. Applet - reading text files packed into JAR file
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-08-2008, 10:15 AM
  5. Reading text file
    By Lennon-Guru in forum New To Java
    Replies: 1
    Last Post: 12-16-2007, 12:38 AM

Posting Permissions

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