Solved

Java Replace-A-Word handler..

Posted on 1997-08-11
1
153 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Groovy problem when using SOAPUI : DispatchException occurred 7 60
use lov values 2 63
Configure a Bean in an XML file 4 42
jboss 7.1 start up error 1 40
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

830 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