> Is there an easy way to search a BufferedInputStream for
> occurrence of a string?
[quoted text clipped - 7 lines]
>
> Thanks, Alan
There are multiple ways to do it. First, you have wrap the InputStream
in a Reader (an InputStreamReader will do), to convert the bytes to chars.
Once you've done this, you can:
1. Read the whole page into a String and use regular expresions on it.
See java.util.regex.
2. Use a more flexible package like JFlex (http://jflex.de). JFlex is
super powerful and super fast, but there is a learning curve. It's what
I use for this purpose.
3. Use one of the HTML parsers out there, like JTidy or NekoHTML.