@@ -0,0 +1,1883 @@
+/**%0A * Copyright (C) 2012 Brookhaven National Laboratory%0A * All rights reserved. Use is subject to license terms.%0A */%0Apackage org.epics.util.array;%0A%0A/**%0A * An implementation of a list on top of buffer. The buffer%0A * will start at the initial capacity (default 10) and will continue%0A * to grow.%0A *%0A * @author carcassi%0A */%0Apublic class BufferInt extends ListInt %7B%0A    %0A    private int%5B%5D data;%0A    private int endOffset;%0A%0A    /**%0A     * Creates a new buffer.%0A     */%0A    public BufferInt() %7B%0A        this(10);%0A    %7D%0A%0A    /**%0A     * Creates a new buffer.%0A     * %0A     * @param initialCapacity initial capacity%0A     */%0A    public BufferInt(int initialCapacity) %7B%0A        data = new int%5BinitialCapacity%5D;%0A    %7D%0A    %0A    private void resize() %7B%0A        int oldSize = data.length;%0A        int newSize = oldSize * 2;%0A        int%5B%5D newData = new int%5BnewSize%5D;%0A        System.arraycopy(data, 0, newData, 0, oldSize);%0A        data = newData;%0A    %7D%0A%0A    /**%0A     * %7B@inheritDoc %7D%0A     */%0A    @Override%0A    public int getInt(int index) %7B%0A        if (index %3E= endOffset) %7B%0A            throw new ArrayIndexOutOfBoundsException(index);%0A        %7D%0A        return data%5Bindex%5D;%0A    %7D%0A%0A    /**%0A     * %7B@inheritDoc %7D%0A     */%0A    @Override%0A    public int size() %7B%0A        int size = endOffset;%0A        return size;%0A    %7D%0A%0A    /**%0A     * Adds a new value.%0A     * %0A     * @param value new value%0A     */%0A    public void addInt(int value) %7B%0A        data%5BendOffset%5D = value;%0A        endOffset++;%0A        %0A        // Grow the buffer if needed%0A        if (endOffset == data.length)%0A            resize();%0A        %0A    %7D%0A    %0A    /**%0A     * Removes all values from the buffer.%0A     */%0A    public void clear() %7B%0A        endOffset = 0;%0A    %7D%0A%0A    /**%0A     * The maximum capacity for this buffer.%0A     * %0A     * @return maximum capacity%0A     */%0A    public int getCurrentCapacity() %7B%0A        return data.length;%0A    %7D%0A%7D%0A

update to SNAPSHOT