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.
|
|
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.
Hi Liwzh,
The Ice/async demo illustrates both AMI and AMD.
Can you describe in more details what you are trying to do?I recognize using dynamic 'ami' and 'amd' can reduce the copy time by using Ice.BaseStream.
Cheers,
Bernard
Bernard Normier
ZeroC, Inc.
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? !
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,
Bernard
Bernard Normier
ZeroC, Inc.
I see. Thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)