[vtkusers] Returning datas as java array
Jarek Sacha
galicjan at yahoo.com
Tue Nov 5 13:42:34 EST 2002
--- Simon Chatelain <simon.chatelain at epfl.ch> wrote:
> Hello,
> i'm still trying to transfer my vtkimageData via Java-RMI. But now, i'am
>
> trying to subclass vtkImageData to add a method who return
> all the datas as a byte array. And i want to call this method from Java
> to reiceve a java Byte Array (byte[]) but if the C++ method return a
> char*
> the wrapper understand that as returning a java String.
[I did not follow what you were doing before, not sure what wrapper you
mean above.]
You can convert String to byte[] either using String.getBytes() method or
CharacterEncoder class (new Java 1.4).
Jarek
__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/
More information about the vtkusers
mailing list