I\'ve been trying to write some very fast Java code that has to do a lot of I/O. I\'m using a memory mapped file that returns a ByteBuffer:
public static Byt
Wrapping byte[] won't slow things down...there won't be any huge array copies or other little performance evils. From the JavaDocs: java.nio.ByteBuffer .wrap()
Wraps a byte array into a buffer.
The new buffer will be backed by the the given byte array; that is, modifications to the buffer will cause the array to be modified and vice versa. The new buffer's capacity and limit will be array.length, its position will be zero, and its mark will be undefined. Its backing array will be the given array, and its array offset will be zero.