Hi Tony,
One way to handle this would be to write a custom
serializer/deserializer that converts to/from files. The deserializer
would be called with the large base64 data string, which it would write
out to a file on the local file system and then return the path to the
file as the deserialized value (or an actual File object, if you
prefer). The serializer would be called with the file path (or File
object), and would return the text of the file.
This isn't completely ideal, in that you're still going to be working
with very large Strings for the base64 values, but you'd only need to
have one in memory at a time.
- Dennis
Javadev wrote:
Hi to all,
I'm a newbie to Jibx, so please, forgive me if I post an already asked
question (enven if I don't find a post that could interest me in the
archive).
Here's my issue. I'd like to user Jibx to unmarshall/marshall a XML
document that could be huge (almost 100Mb, very rare but could be
happened).
The format of document is something like that :
<rootElement>
<childElement>
....
</childElement>
<Object>
<HugeData id="1" format="base64">data encoded in base64</HugeData>
<HugeData id="2" format="base64">data encoded in base64</HugeData>
</Object>
</rootElement>
In fact in the most of cases, I don’t have to “handle” the <HugeData>.
I’ve to extract them into a separated file only on demand. But when I
unmarshall the document I get a “OutOfMemory” exception (cause I bind
it with “String” type first). Then I try some others tips, but none
works L. I tried to write an empty marshaller (that implements
IMarshaller, IUnmarshaller, IAliasable, like the example with
HashMapper) but I get the same result L
So how could I do ? How Can I map the <HugeData> in order to avoid
that could be loaded in memory (I’d like to write it directly into a
file instead) ? Does somebody manage to resolve this issue ?
Thanks in advance for your replies.
Cheers
Tony
PS: Sorry for my poor English level.
-----Message d'origine-----
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de
[EMAIL PROTECTED]
Envoyé : mardi 24 janvier 2006 19:03
À : [EMAIL PROTECTED]
Objet : Welcome to the "jibx-users" mailing list (Digest mode)
Welcome to the [email protected] mailing list!
To post to this list, send your email to:
[email protected]
General information about the mailing list is at:
https://lists.sourceforge.net/lists/listinfo/jibx-users
If you ever want to unsubscribe or change your options (eg, switch to
or from digest mode, change your password, etc.), visit your
subscription page at:
https://lists.sourceforge.net/lists/options/jibx-users/java2004kto%40yahoo.fr
You can also make such adjustments via email by sending a message to:
[EMAIL PROTECTED]
with the word `help' in the subject or body (don't include the
quotes), and you will get back a message with instructions.
You must know your password to change your options (including changing
the password, itself) or to unsubscribe. It is:
java2004kto
If you forget your password, don't worry, you will receive a monthly
reminder telling you what all your lists.sourceforge.net mailing list
passwords are, and how to unsubscribe or change your options. There
is also a button on your options page that will email your current
password to you.
You may also have your password mailed to you automatically off of the
Web page noted above.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users