ChannelBuffer sedit / grep
Trustin Lee
tlee at redhat.com
Thu Feb 26 07:09:35 EST 2009
Hi Dave,
I think it depends on the complexity of the manipulation. If it's
simple search and replace based on regular expression, I'd convert the
content to a string and run regular expression on it, and convert it
back to a ChannelBuffer. Building a DOM of an HTML is risky because
many HTML pages in the world are not well-formed.
HTH,
— Trustin Lee, http://gleamynode.net/
On Tue, Feb 24, 2009 at 9:50 PM, Dave Siracusa
<dave.siracusa at yellowbook.com> wrote:
>
> I wish to perform text search/replace in the response returned from the
> internet cloud within my http proxy server.
>
> Should I use indexOf and manipulate the ChannelBuffer buffer directly?
> Another approach would be to create a html decoder and deal with it at a OO
> level.
> It needs to be fast though.
>
> Any suggestions or pseudo code would be appreciated.
> --
> View this message in context: http://n2.nabble.com/ChannelBuffer-sedit---grep-tp2377633p2377633.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>
More information about the netty-users
mailing list