The jaxb specification suggests an optimized way like following:
<?xml version="1.0" ?>
<xs:schema xmlns:xs="
http://www.w3.org/2001/XMLSchema"
xmlns:tns="
http://example.com/know-type"
| xmlns:xmime="
http://www.w3.org/2005/05/xmlmime"
targetNamespace="
http://example.com/know-type">
<xs:import namespace="
http://www.w3.org/2005/05/xmlmime"
schemaLocation="
http://www.w3.org/2005/05/xmlmime"/>
<xs:element name="JPEGPicture" type="xs:base64binary"
xmime:expectedContentTypes="image/jpeg"/>
</xs:schema>
2011/10/29 Hello! hello <prosp4300_at_gmail.com>
> I think to process binary data within jaxb, you need alway encode it via
> base64, then take it as normal text data
>
> The type converter mechanism provided by jaxb should be useful for this
>
>
> 2011/10/24 Simon Altmann <simon_at_fbsaust.com.au>
>
>> Is there any sane way to use jaxb to write a bufferedImage to file ?****
>>
>> ** **
>>
>> Thanks****
>>
>> ** **
>>
>> Simon****
>>
>> ** **
>>
>> Java developer****
>>
>>
>> ---------------------------------------------------------------------------
>>
>> This e-mail may be confidential. Any opinions expressed herein are the
>> opinion of the writer unless there is an express indication to the
>> contrary.
>> If you are not the intended recipient of this communication please delete
>> and destroy all copies and immediately reply by return e-mail. Future
>> Business Systems disclaims all liability and responsibility for any direct
>> or indirect loss arising from this e-mail and/or any attachments.
>>
>
>