public void enqueue(Object obj) {
        ensureFree(1);
        buf[writePos++] = obj;
        if (writePos == buf.length) {
            writePos = 0;
        }
        used++;
    }
Enqueue an object on this queue.

@param obj the object to enqueue
jrt/src/com/yahoo/jrt/Queue.java