public <X extends FSTStruct> StructArray<X> newArray(int size, X templ, BytezAllocator alloc) {
        StructArray<X> aTemplate = new StructArray<X>(size, templ);
        int siz = getFactory().calcStructSize(aTemplate);
        try {
            if ( siz < chunkSize )
                return newStruct(aTemplate);
            else {
                return getFactory().toStruct(aTemplate,alloc);
            }
        } catch (Throwable e) {
            throw new RuntimeException(e);
        }
    }
public <X extends FSTStruct> StructArray<X> newArray(int size, X templ, BytezAllocator alloc) {
        StructArray<X> aTemplate = new StructArray<X>(size, templ);
        int siz = getFactory().calcStructSize(aTemplate);
        try {
            if ( siz < chunkSize )
                return newStruct(aTemplate);
            else {
                return getFactory().toStruct(aTemplate,alloc);
            }
        } catch (Throwable e) {
            throw new RuntimeException(e);
        }
    }
public < X extends FSTStruct > StructArray < X > newArray ( int size , X templ , BytezAllocator alloc ) { StructArray < X > aTemplate = new StructArray < X > ( size , templ ) ; int siz = getFactory ( ) . calcStructSize ( aTemplate ) ; try { if ( siz < chunkSize ) return newStruct ( aTemplate ) ; else { return getFactory ( ) . toStruct ( aTemplate , alloc ) ; } } catch ( Throwable e ) { throw new RuntimeException ( e ) ; } }
create a new struct array of same type as template
@param size
@return
create a new struct array of same type as template