-
1. Re: Issues with determining String size for encoding
timfox Sep 10, 2010 5:39 AM (in response to jmesnil)Not sure why this is an issue.
If you use ChannelBufferWrapper.writeString() and ChannelBufferWrapper.readString() it should handle all this for you.
Can you be more specific about where this problem occurs?
-
2. Re: Issues with determining String size for encoding
jmesnil Sep 10, 2010 5:42 AM (in response to jmesnil)On second look, it is fine to use BufferHelper.sizeOfNullableSimpleString(String) to determine the size of the string *as long as we also use BufferHelper.writeAsSimpleString(Buffer, String) and not HornetQBuffer.writeString(String) directly*... not very intuitive...
PersistedDestination was the only class where it was not the case (hence the issue fixed yesterday).
-
3. Re: Issues with determining String size for encoding
timfox Sep 10, 2010 6:02 AM (in response to jmesnil)Sounds pretty intuitive to me. If you encoded it as a SimpleString you can use sizeOfNullableSimpleString(), if you didn't encode it as a SimpleString you can't use sizeOfNullableSimpleString since it's... not encoded as a SimpleString.