thanks! that worked. the cast to int makes sense is since the jvm will
convert the byte value to an int for the & computation
On Jul 27, 2:47 pm, Joost wrote:
> Peter Ryan wrote:
> > I am trying to avoid a reflective callback with this function:
>
> > (defn unsign-byte-from-buffer [#^java.nio.Byt
Peter Ryan wrote:
> I am trying to avoid a reflective callback with this function:
>
> (defn unsign-byte-from-buffer [#^java.nio.ByteBuffer buffer]
> (bit-and 0xFF (.get buffer)))
>
> (println "should be 254" (unsign-byte-from-buffer (java.nio.ByteBuffer/
> wrap (byte-array [(byte 0xFE)]
>
I am trying to avoid a reflective callback with this function:
(defn unsign-byte-from-buffer [#^java.nio.ByteBuffer buffer]
(bit-and 0xFF (.get buffer)))
(println "should be 254" (unsign-byte-from-buffer (java.nio.ByteBuffer/
wrap (byte-array [(byte 0xFE)]
when run with (set! *warn-on-refl