Can anybody please tell me what are those possible purposes of allocating zero-length buffer?
ByteBuffer.allocate(0); // no IllegalArgumentException
Why the one who designed the API did this?
Thanks for comments and answers.
I hope there will be an update like this. :)
public abstract class ByteBuffer
extends Buffer
implements Comparable<ByteBuffer> {
public static final ByteBuffer VOID = allocate(0);
}