Solved

Java Replace-A-Word handler..

Posted on 1997-08-11
1
152 Views
Last Modified: 2006-11-17
I need a simple handler that can replace a word in a text. The built-in replace() function can only replace one char. So actually what I need is a way to enumerate through a plain text in a fast way...?
0
Comment
Question by:lassefar
1 Comment
 
LVL 5

Accepted Solution

by:
msmolyak earned 50 total points
ID: 1224729
Is InputStream something you are looking for. If you have a file you can create a Data inputStram on top of a FileInputStream (or FileRedaer in JDK 1.1) and go though the bytes (or characters) in that file one by one). You can write the result to some OutputStream or (Writer). If the data is in a string, you can
create a StringBufferInputStream (or StringReader). You also have a TokenizerStream which allow you to do some simple parsing of your text.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JDeveloper 12c for 32 bit 4 84
GUI builder for Eclipse? 8 35
servlet  URL Rewriting 1 36
Opening PDF on button click and fill new document 2 37
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question