On 7/25/07, Stefano Bagnara <[EMAIL PROTECTED]> wrote:
Robert Burrell Donkin ha scritto:
> On 7/25/07, Stefano Bagnara <[EMAIL PROTECTED]> wrote:
>> I'd go for an exception. But I don't know the code enough to understand
>> how likely this will happen and how likely this is a programmer error or
>> something else.
>
> AFAICT it would be an implementation error
>
> state is maintained in both the pull parser and the cursor
>
> the cursor needs to understand whether it is within a part in a mime
> message or within not since the input stream reads only within a part.
> the pull parser also records this information.
>
> would probably be cleaner to maintain this is one place. ideas welcomed.

what about adding a Cursor.isInMimePart() or something similar?

an possible alternative would be to rework cursor as a minimal pull parser

the boundaries of each header would be located but the contents not
parsed (except for the mime information that the parser needs)

the boundaries of each part would be located but the contents not parsed

this might be useful in general and would be a cleaner API at the
price of each cursor implementation requiring more intelligence

opinions?

- robert

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to