/** create a row block, allocate memory, get ready for writing */ public static GTRowBlock allocate(GTInfo info) { GTRowBlock b = new GTRowBlock(info); byte[] array = new byte[info.getMaxColumnLength(info.primaryKey)]; b.primaryKey.reset(array, 0, array.length); int maxRows = info.isRowBlockEnabled() ? info.rowBlockSize : 1; for (int i = 0; i < b.cellBlocks.length; i++) { array = new byte[info.getMaxColumnLength(info.colBlocks[i]) * maxRows]; b.cellBlocks[i].reset(array, 0, array.length); } return b; }
/** create a row block, allocate memory, get ready for writing */ public static GTRowBlock allocate(GTInfo info) { GTRowBlock b = new GTRowBlock(info); byte[] array = new byte[info.getMaxColumnLength(info.primaryKey)]; b.primaryKey.reset(array, 0, array.length); int maxRows = info.isRowBlockEnabled() ? info.rowBlockSize : 1; for (int i = 0; i < b.cellBlocks.length; i++) { array = new byte[info.getMaxColumnLength(info.colBlocks[i]) * maxRows]; b.cellBlocks[i].reset(array, 0, array.length); } return b; }