Good morning,

Can anybody describe an elegant way to create a base-64 encoded file with a header and trailer like:

-------------------- BEGIN B64 OBJECT ----------------
My base64 encoded data
--------------------- END B64 OBJECT -----------------

I've setup the header and trailer as strings, so I can pipeline a StringSource to a FileSink; but successive calls like:

StringSource(headerStr... FileSink(my output file));
StringSource(dataBuffer, new Base64Encoder(FileSink(my output file));
StringSource(trailerStr... FileSink(my output file));

just overwrite the data written to the output file.

What construct should I be using? A MessageQueue? A ChannelSwitch?

All the best
--


_____________________________________________ James Bishop Institute for the Protection and Security of the Citizen (IPSC) European Commission - Joint Research Centre I - 21020 Ispra, Italy Tel.: +39 0332 786225 Fax.: +39 0332 786280 e-mail: [EMAIL PROTECTED]



Reply via email to