I'm looking for the best way to do in my application, and now I'm wondering:
I received a byte array (byte[]) by reading an InputStream. Then I have to do some treatment, so I pass this array as a parameter of a method. Coming from C++ language, and as I have to do this treatment as fast as possible, and many time, I am wondering if passing a byte array by value might not cause problems.
Is it worth creating a ByteBuffer object to pass a reference to my method instead of a value?
Thank you for your help and advices.