> > > Some of the goals I was working towards were: > > > 1. No memory allocation during streaming. This > > > eliminates > > > garbage collection during large conversions. > > Cool. I got large conversions... I'm already at > > mediumblob in mysql , and it goes up/down XML > stream > > :) > > I have a lot to learn here. While I have some > knowledge > of XML (like every other developer on the planet), I > have never used it for large data sets or used SAX > parsing. > Sounds like a good test to find holes in the design > :-)
It's easy. You got callback, where you can gobble up string buffers with incoming chars for element contents. ( and there is a lot of this stuff... ) After tag is closed, you have all the chars in a big string buffer, and get another callback - in this callback you have to convert data, and do whatever necessary ( in my case, create input stream, and pass it to database ) > > > 3. Customisable receivers. All codecs utilise > > > receivers to > > > handle conversion results. This allows > different > > > outputs such as > > > streams, in-memory buffers, etc to be supported. > > > > And writers :) Velocity directives use them. > > Do you mean java.io.Writer? If so I haven't > included > direct support for them because I focused on raw > byte > streams. However it shouldn't be hard to add a > receiver to write to java.io.Writer instances. My scenarios: - I'm exporting information as base64 to XML with help ov velocity. I do it through custom directive - in this directive I get a Writer from velocity, where I have to put my data. Ideally codec would do: read input stream - encode - put it into writer without allocating too much memory. I'm importing information: - I have stream ( string ) of base 64 data - codec gives me an input stream which is fed from this source and does not allocate too much memory and behaves polite... regards, ===== ----[ Konstantin Pribluda ( ko5tik ) ]---------------- Zu Verstärkung meines Teams suche ich ab Sofort einen Softwareentwickler[In] für die Festanstellung. Arbeitsort: Mainz Skills: Programieren, Kentnisse in OpenSource-Bereich ----[ http://www.pribluda.de ]------------------------ __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]