commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Sutic" <leo.su...@inspireinfrastructure.com>
Subject RE: Wanted: Regex[Input|Output]Stream
Date Thu, 04 Sep 2003 11:24:31 GMT
Just a comment: Instead of using exceptions, how about this:

    public interface MatchObserver {
        public void onMatch (long offset, byte b, String pattern);
    }

    public class Regex(Input|Output)Stream {

        public Regex(Input|Output)Stream ((Input|Output)Stream stream, 
                                          MatchObserver observer);
    }

and use callbacks instead?

I looked through the ORO classes, but it appears that the Perl5 regexes
can't be used with streams. (Possible because they aren't true FSAs.)

/LS

> From: Noel J. Bergman [mailto:noel@devtech.com] 


Mime
View raw message