Hi Stefano 2010/1/13 Stefano Bagnara <[email protected]>: > In order to change this each field body should be treated in a similar > way to mime contents and a way to access the field stream would be > needed. So, if I understand your request, you would change the parser > to only check for the header name until it finds the ":" then throw an > event "HEADER_FIELD" passing you the name and a stream including all > the folded lines and terminating with the last folded line.
That sounds like a reasonable solution. > At this > point you would wrap the stream in a reader and use the > AddressFieldParser to parse the stream (I don't remember if the > AddressFieldParser will parse the whole stream at once and return the > parsed structure or if you can traverse the tree without storing it in > memory). AddressListParser can take a raw InputStream however I've tested it and it does read the whole stream before returning anything. That would be ok to start with. To make it more incremental it looks like AddressListParser.jjt would need to have NODE_SCOPE_HOOK set and some kind of callback in closeNodeScope() for address nodes. > Currently I don't know if you should better develop your change > against trunk or the cycleclean branch (maybe you can help looking at > both and saying your opinion about their organization). Ok, I think I'll wait till the dust has settled. thanks Rohan
