Hi Mark, > I have an application where I have the image data in a ByteBuffer and > I want to scan through the elements. > > My Profiler shows getElem() or getElemDouble() as the major > performance bottlenecks. Is there a way to convert a ByteBuffer to > byte[] so I can scan the bytes much faster?
I suppose, you have the image data in a DataBufferByte. If that's the case, you can call getData() on it, to get hold of the underlying byte array data. If you _really_ mean ByteBuffer (java.nio), then you can try array(). Cheers, Roman -- http://kennke.org/blog/ =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".