javacast to byte[] not working

2011-04-28 Thread Phil Stone
Hello, In a cfc, I'm calling a Java method which returns, among other things, a primitive byte array (i.e. sigObject.getSignature(), below, returns a byte[]). I'm putting this byte array,along with the other things, into a CF struct, and returning that struct: cffunction name=sign

Re: javacast to byte[] not working

2011-04-28 Thread Leigh
First of all, why is the error message complaining that type byte[] must be one of the following and one of the following (by clear inference) is byte[]? Probably just a generic/badly worded error message Secondly, why is the javacast failing? I'm clearly passing a valid byte array to

Re: javacast to byte[] not working

2011-04-28 Thread Phil Stone
First of all, why is the error message complaining that type byte[] must be one of the following and one of the following (by clear inference) is byte[]? Probably just a generic/badly worded error message Secondly, why is the javacast failing? I'm clearly passing a valid byte

RE: javacast to byte[] not working

2011-04-28 Thread Brook Davies
Try JavaCast(byte, #sigData.signature#) Or sigData.signature.toByteArray() Brook -Original Message- From: Phil Stone [mailto:pkst...@ucdavis.edu] Sent: April-28-11 2:28 PM To: cf-talk Subject: javacast to byte[] not working Hello, In a cfc, I'm calling a Java method which

Re: javacast to byte[] not working

2011-04-28 Thread Leigh
I was under the impression that all arguments to overloaded Java functions had to be JavaCast(ed). And it certainly works on all other Java types that I've tried... Yes, normally you should. I am not sure why byte[] arrays are treated/behave differently. Maybe a bug? Admittedly the cast is

Re: javacast to byte[] not working

2011-04-28 Thread Sean Corfield
On Thu, Apr 28, 2011 at 3:23 PM, Phil Stone pkst...@ucdavis.edu wrote: Well, that did the trick. Thank you! I was under the impression that all arguments to overloaded Java functions had to be JavaCast(ed). And it certainly works on all other Java types that I've tried... I do a lot of Java

Re: javacast to byte[] not working

2011-04-28 Thread Leigh
Well, that did the trick. Thank you! I was under the impression that all arguments to overloaded Java functions had to be JavaCast(ed). And it certainly works on all other Java types that I've tried... Actually on second read, Sean's answer is better. I missed the emphasis on *had to