Solved

Java Replace-A-Word handler..

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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 will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now