users@fi.java.net

Re: Example code

From: Michael Seminaro <Michael.Seminaro_at_Sun.COM>
Date: Wed, 24 May 2006 23:56:51 -0400

Paul,

I used the SAX serializer as in the unit tests and it seems to be
converting binary data into base64. Is there a way to write out
binary data into the FI document without any encoding?

Thanks, I appreciate the help.
--
Michael Seminaro
Sun Microsystems, Inc.
Phone: x53182/+1-703-579-1969
Email: michael.seminaro_at_sun.com
On May 24, 2006, at 9:16 AM, Paul Sandoz wrote:
> Hi Michael,
>
> Next week i will do the following:
>
> - write a blog on this subject, see here [1]; and
>
> - write some sample code.
>
> In the mean time you could look at the JavaDoc, in particular the  
> SAX serializer/parser and the:
>
> org.jvnet.fastinfoset.sax.PrimitiveTypeContentHandler
>
> If you are feeling a little braver you could take a look at the  
> AlgorithmTest [2] JUnit test case (see method  
> createBuiltInTestFastInfosetDocument).
>
> Paul.
>
> [1] http://blogs.sun.com/roller/page/sandoz
> [2] https://fi.dev.java.net/source/browse/fi/FastInfoset/test/ 
> algorithm/AlgorithmTest.java?view=markup
>
> Michael Seminaro wrote:
>> Can you point me to any example code or documentation for this  
>> API, other than the really brief examples that exist on the "how  
>> to use:" page? In particular, I would like to know how to build up  
>> an XML document with binary content, in memory, and have that  
>> serialized to a fast infoset document without performing any  
>> character encoding on the binary data.
>> Thanks.
>> --
>> *Michael Seminaro
>> *
>> Sun Microsystems, Inc.
>> Phone: x53182/+1-703-579-1969
>> Email: michael.seminaro_at_sun.com <mailto:michael.seminaro_at_sun.com>
>
> -- 
> | ? + ? = To question
> ----------------\
>    Paul Sandoz
>         x38109
> +33-4-76188109