jakarta-oro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <...@savarese.org>
Subject Re: AwkStreamInput
Date Tue, 12 Feb 2002 04:00:17 GMT

In message <OF707FDDCC.CD9C20ED-ON86256B5D.00763979@wdimail.com>, BMadigan@wdim
ail.com writes:
>offset of the match from the beginning of the Reader's stream. So if I call
>skip() on the Reader, and then call contains( ), I am getting back a match
>offset from the current position in the Reader's stream, not the offset
>from the beginning.
>Is this the correct behavior? It is not as I would expect from what the api

Yes, it's the correct behavior.  If you call skip(), there's no way for
AwkStreamInput to know so.  After you've passed a Reader to AwkStreamInput
you should not manipulate it independently.  You're free to add a skip()
method to AwkStreamInput or devise some better thought out system for
keeping track of this state.  AwkStreamInput is inelegant and something
of a kluge, but it's the way it is for performance.  The approach taken
in the JDK 1.4 new i/o packages is much better from a design standpoint,
but may be slower because of all the extra method invocations.

daniel



--
To unsubscribe, e-mail:   <mailto:oro-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:oro-dev-help@jakarta.apache.org>


Mime
View raw message