Hi Thilina, On Sat, 2006-04-08 at 13:42 +0600, Thilina Gunarathne wrote: > Hi Depak, > My apologies for the very late response.. I was planning to write a > detailed a response to your proposal, but wasn't able till now :(.. > > IMHO we need to do some internal tweekings of the mime parser in order > to achive the attachment streaming capability.. Currently we use Java > Mail to parse the content inside mime parts.. (content between the two > boundaries)..Our parser do the parsing up the boundaries.. AFAIK java > mail reads the whole MIME part whenever we create a MIMEPart... We'll > be returning an already read and buffered stream to the user If we go > ahead with this setup.. > > Inorder to give the user access to the pure attachments from the > instream, we need have the ability of deffrred parsing those MIMEparts > too... This basically means we need to improve our mime parser even to > parse the contents inside the MIMEParts too, so that we get the > capability to handle the stream in to Axis2.. Then we can just parse > the headers of the MIME part and wait at that point.. So that we can > return the real stream directly to the user when he requests it.. > > Did you addressed the above issue.. If so the perfomance will > definitely be improved.. >
Ah, you are right .. I was under the impression that MimeBodyPart only read the headers, and then didn't read the remainder (i.e. that it returned the attachment stream part when requested), but that is not the case :( Looking at the MimeBodyPart code, I see now that the constructor creates a ByteArrayOutputStream and empties the stream into that. Eventually, I wanted internal axis2 code handling the stream, but I see now that that is more of a necessity (for performance) than just another TODO. I have some ideas on how to implement things so that the stream is read dynamically only upon request, and I will start working on that part now. As this is not a showstopper anymore, is there anything else blocking 1.0 that I could work on? or should I just continue on with this stream handling stuff? Deepak
signature.asc
Description: This is a digitally signed message part
