[jboss-dev-forums] [Design of JBossCache] - Re: String size limitations with TreeCacheMarshaller
clebert.suconic@jboss.com
do-not-reply at jboss.com
Wed Aug 30 10:50:43 EDT 2006
If you use writeObject(String) you won't have a limit problem.
writeUTF still using a short on the beggining of a string identifying its size (from DataOutputSomewhere)
On ObjectOUtputStram.writeObject it's done a check on the size of the string, and a flag it's used to defined if it's a small or a big string.
In JavaOutputStream strings are treated without any metadata check, so you wouldn't have a problem calling wirteObject(String) to write these big strings.
If you still want to write a chuncks of String, I had to write my own UTF parser, and on StringUtil at JBossSerialization I can also write smalls or big strings:
http://fisheye.jboss.com/browse/~raw,r=1.11/JBoss/jboss-serialization/src/org/jboss/serial/util/StringUtil.java
Clebert Suconic
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968388#3968388
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968388
More information about the jboss-dev-forums
mailing list