Here's the code that seems to be doing the serialization of a byte[]
object, from
com.google.gwt.user.client.rpc.core.java.lang.Byte_CustomFieldSerializer:
public static void serialize(SerializationStreamWriter streamWriter,
Byte instance) throws SerializationException {
streamWriter.writeByte(instance.byteValue());
}
and then
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter:
public void writeByte(byte fieldValue) {
append(String.valueOf(fieldValue));
}
I take it that this creates a new String object for each byte in the
byte[]. Furthermore, the encoding is a decimal numeric string,
presumably prefixed with the type code used for the byte type during
serialization which seems to be the class name ("java.lang.Byte").
This at least would explain some of the bloat happening. I'll follow
Matt's advice and will file this as a bug report.
Thanks for all the comments,
-- Axel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---