public int initialize(byte[] data, int offset)
    {
        this.offset = offset;

        List dsftBinSpriteList = new ArrayList();
        
        boolean moreRecords = true;
        boolean readSetHeader = false;
        while(moreRecords)
        {
            DsftBinSprite dbs;
            try
            {
                dbs = (DsftBinSprite)dsftBinSpriteClass.newInstance();
            }
            catch (InstantiationException exception)
            {
                throw new RuntimeException(exception);
            }
            catch (IllegalAccessException exception)
            {
                throw new RuntimeException(exception);
            }
            offset = dbs.initialize(data, offset);
            
            if ((readSetHeader) && (dbs.getSetName().length() != 0))
            {
                offset -= dbs.getRecordSize();
                moreRecords = false;
                break;
            }
            dsftBinSpriteList.add(dbs);
            moreRecords = dbs.hasMoreRecords();
            readSetHeader = true;
        }
        
        dsftBinSpriteArray = new DsftBinSprite[dsftBinSpriteList.size()];
        for (int index = 0; index < dsftBinSpriteArray.length; index++)
        {
            dsftBinSpriteArray[index] = (DsftBinSprite)dsftBinSpriteList.get(index);
        }
        
        return offset;
    }