Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Question on RandomAccessFile searching

  1. #1
    Member
    Join Date
    Mar 2011
    Posts
    114
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Question on RandomAccessFile searching

    Problem: I want to read a file and replace a particular string with new value.
    I know we can update a file using RandomAccessFile. But question is how to search for a particular String in RandomAccessFile.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Question on RandomAccessFile searching

    how to search for a particular String in RandomAccessFile.
    Read the contents of the file as a String and search that String for the particular String.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. RandomAccessFile
    By loui345 in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: November 5th, 2012, 04:16 PM
  2. [SOLVED] get value from database by searching
    By Light Mike in forum JDBC & Databases
    Replies: 4
    Last Post: August 23rd, 2012, 02:43 AM
  3. Searching
    By killer3p0 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: May 17th, 2012, 08:06 AM
  4. RandomAccessFile.readByte() find EOF
    By chopficaro in forum Java Theory & Questions
    Replies: 3
    Last Post: May 6th, 2010, 03:14 AM
  5. searching a string
    By dvsumosize in forum What's Wrong With My Code?
    Replies: 1
    Last Post: February 23rd, 2010, 01:31 AM