Archived
This forum has been archived. Please start a new discussion on GitHub.
Whrere can I find the sample source about dynamic 'ami' and 'amd'
I read the online manual again. I recognize using dynamic 'ami' and 'amd' can reduce the copy time by using Ice.BaseStream. But I can't find more sample code expect the online manual. Can anybody show me some. Thanks a lot.
0
Comments
-
Hi Liwzh,
The Ice/async demo illustrates both AMI and AMD.I recognize using dynamic 'ami' and 'amd' can reduce the copy time by using Ice.BaseStream.
Can you describe in more details what you are trying to do?
Cheers,
Bernard0 -
For example, I have a big bytes array in which the part is available.
When using the Ice::ByteSeq, I have no choice but copy this. Beacause I can't give the function such as 'writeByteSeq(byte[],int offset,int length)' function.
Is there any way not to do this extra copy? !0 -
This byte-array optimization is unrelated to AMI or AMD.
The relevant Ice for Java feature is "metadata", which allows you select the Java type used by Ice for your Slice types/parameters: Customizing the Java Mapping
But unfortunately, there is no Java metadata that allows you to send just a subset of a byte-array. (We have such metadata in C++, but not Java).
The only solution I see is creating a temporary array for your sub-array, using for example System.arraycopy.
Cheers,
Bernard0 -
I see. Thanks!0