Byte array

2 views
Skip to first unread message

Guillaume Faure

unread,
Jul 2, 2008, 11:05:42 AM7/2/08
to clojure
Hello everyone. I was wondering if I had missed something, but it does not
seem to have a way of creating a array of byte from clojure. Found for
int/long/double/float but nothing for byte.

Is it somewhere I have not looked at ?

Thanks a lot

Guillaume.

MikeM

unread,
Jul 2, 2008, 11:11:55 AM7/2/08
to Clojure
You can use make-array:

(make-array (. Byte TYPE) 10)

doc at http://clojure.org/java_interop#toc25

Phil Jordan

unread,
Jul 2, 2008, 11:14:58 AM7/2/08
to clo...@googlegroups.com

(make-array (. Byte TYPE) arraylen)

works for me.

~phil

Guillaume Faure

unread,
Jul 2, 2008, 9:20:50 PM7/2/08
to clo...@googlegroups.com
Phil Jordan <li...@philjordan.eu> writes:


> (make-array (. Byte TYPE) arraylen)
>
> works for me.
>
> ~phil

Thanks a lot Phil and Mike. I knew I had missed something :p.

Guillaume.

Reply all
Reply to author
Forward
0 new messages