Gets byte type values from [rowId, rowId + count). The return values for the null slots
are undefined and can be anything.
764236
public byte[] getBytes(int rowId, int count) {
    byte[] res = new byte[count];
    for (int i = 0; i < count; i++) {
      res[i] = getByte(rowId + i);
    }
    return res;
  }
52713
public static ByteMap<byte[]> getTagUids(final byte[] row) {
    final ByteMap<byte[]> uids = new ByteMap<byte[]>();
    final short name_width = TSDB.tagk_width();
    final short value_width = TSDB.tagv_width();
    final short tag_bytes = (short) (name_width + value_width);
    final short metric_ts_bytes = (short) (TSDB.metrics_width()
                                           + Const.TIMESTAMP_BYTES
                                           + Const.SALT_WIDTH());

    for (short pos = metric_ts_bytes; pos < row.length; pos += tag_bytes) {
      final byte[] tmp_name = new byte[name_width];
      final byte[] tmp_value = new byte[value_width];
      System.arraycopy(row, pos, tmp_name, 0, name_width);
      System.arraycopy(row, pos + name_width, tmp_value, 0, value_width);
      uids.put(tmp_name, tmp_value);
    }
    return uids;
  }
1164765
public float[] getFloats(int rowId, int count) {
    float[] res = new float[count];
    for (int i = 0; i < count; i++) {
      res[i] = getFloat(rowId + i);
    }
    return res;
  }
748677
function(data){
			var rows = this.calculateRowsNumber();
			var datas = [];
			for(var i = 0; i < data.length; i += rows){
				datas.push(data.slice(i, i+rows));
			}
			return datas;
		}
873855
public Object[] getRow(int row) {
    Object[] ret = new Object[columns.size()];
    for(int c = 0; c < columns.size(); c++) {
      ret[c] = data(row, c);
    }
    return ret;
  }
562076
private static int getDataRows(Chunk[] chunks, Frame f, int[] chunksIds, int cols) {
        double totalRows = 0;
        if(null != chunks) {
            for (Chunk ch : chunks) {
                totalRows += ch.len();
            }
        } else {
            for(int chunkId : chunksIds) {
                totalRows += f.anyVec().chunkLen(chunkId);
            }
        }
        return (int) Math.ceil(totalRows * cols / SPARSE_MATRIX_DIM);
    }
112204
public short[] getShorts(int rowId, int count) {
    short[] res = new short[count];
    for (int i = 0; i < count; i++) {
      res[i] = getShort(rowId + i);
    }
    return res;
  }
1351647
private void readUncompressedIntegerRowByNumber( ByteBuffer rowdata, int rn, RandomAccessFile thefile ) throws IOException,
            DataFormatException {
        int cellValue = 0;
        ByteBuffer cell = ByteBuffer.allocate(rasterMapType);

        /* The number of bytes that are inside a row in the file. */
        int filerowsize = fileWindow.getCols() * rasterMapType;

        /* Position the file pointer to read the row */
        thefile.seek((rn * filerowsize));

        /* Read the row of data from the file */
        ByteBuffer tmpBuffer = ByteBuffer.allocate(filerowsize);
        thefile.read(tmpBuffer.array());

        /*
         * Transform the rasterMapType-size-values to a standard 4 bytes integer value
         */
        while( tmpBuffer.hasRemaining() ) {
            // read the value
            tmpBuffer.get(cell.array());

            /*
             * Integers can be of 1, 2, or 4 bytes. As rasterBuffer expects 4 byte integers we need
             * to pad them with 0's. The order of the padding is determined by the ByteOrder of the
             * buffer.
             */
            if (rasterMapType == 1) {
                cellValue = (cell.get(0) & 0xff);
            } else if (rasterMapType == 2) {
                cellValue = cell.getShort(0);
            } else if (rasterMapType == 4) {
                cellValue = cell.getInt(0);
            }
            // if (logger.isDebugEnabled()) logger.debug("tmpint=" + cellValue
            // );
            rowdata.putInt(cellValue);
        }
    }
510915
function (xmlNode) {

            var rawValues = this.getRawValues(xmlNode);
            if (!rawValues) {
                return null;
            }

            var len = rawValues.length;

            var bufferData = new Float32Array(len);
            for (var i = 0; i < len; i++) {
                bufferData[i] = parseFloat(rawValues[i]);
            }

            return bufferData;
        }
691697
@Override
    Type getDataType() {
        switch (opType) {
        case OpTypes.WINDOWED_RANK:
        case OpTypes.WINDOWED_DENSE_RANK:
        case OpTypes.WINDOWED_ROW_NUMBER:
        case OpTypes.WINDOWED_COUNT:
            return Type.SQL_BIGINT;
        case OpTypes.WINDOWED_MAX:
        case OpTypes.WINDOWED_MIN:
        case OpTypes.WINDOWED_SUM:
        	return dataType;
        default:
            throw Error.error("Unsupported windowed function " + OpTypes.aggregateName(opType), "", 0);
        }
    }
165515
@Override
    public byte[] getBinaryValue(Base64Variant b64variant) throws IOException {
        Object n = currentNode();
        if (n instanceof byte[]) {
            return (byte[]) n;
        } else if (n instanceof org.bson.types.ObjectId) {
            return ((org.bson.types.ObjectId) n).toByteArray();
        }
        return null;
    }

    @Override
    public Object getEmbeddedObject() throws IOException, JsonParseException {
        return currentNode();
    }

    /*
   /**********************************************************
   /* Internal methods
   /**********************************************************
    */

    protected Object currentNode() {
        if (closed || nodeCursor == null) {
            return null;
        }
        return nodeCursor.currentNode();
    }
825471
def getTypedValueOrException(self, row):
        ''
        return wrapply(self.type, wrapply(self.getValue, row))
1194474
public int getRowCount() {
    if (DataTable_Type.featOkTst && ((DataTable_Type)jcasType).casFeat_rowCount == null)
      jcasType.jcas.throwFeatMissing("rowCount", "ch.epfl.bbp.uima.types.DataTable");
    return jcasType.ll_cas.ll_getIntValue(addr, ((DataTable_Type)jcasType).casFeatCode_rowCount);}
599727
private boolean readNullValueAtRowCol( int currentfilerow, int currentfilecol ) throws IOException {
        /*
         * If the null file doesn't exist and the map is an integer, than it is an old integer-map
         * format, where the novalues are the cells that contain the values 0
         */
        if (nullFile != null) {
            long byteperrow = (long) Math.ceil(fileWindow.getCols() / 8.0); // in the
            // null
            // map of
            // cell_misc
            long currentByte = (long) Math.ceil((currentfilecol + 1) / 8.0); // in the
            // null
            // map

            // currentfilerow starts from 0, so it is the row before the one we
            // need
            long byteToRead = (byteperrow * currentfilerow) + currentByte;

            nullFile.seek(byteToRead - 1);

            int bitposition = (currentfilecol) % 8;

            byte[] thetmp = new byte[1];
            thetmp[0] = nullFile.readByte();
            BitSet tmp = FileUtilities.fromByteArray(thetmp);

            boolean theBit = tmp.get(7 - bitposition);
            /*
             * if (theBit) { System.out.println("1 at position: " + (7-bitposition) + " due to
             * bitposition: " + bitposition); } else { System.out.println("0 at position: " +
             * (7-bitposition) + " due to bitposition: " + bitposition); }
             */
            return theBit;

        }
        // else
        // {
        // /* There is no null file around */
        // if (rasterMapType > 0)
        // {
        // // isOldIntegerMap = true;
        // return false;
        // }
        // else
        // {
        // //throw some exception
        // return false;
        // }
        //
        // }
        return false;

    }
328590
private void readCompressedIntegerRowByNumber( ByteBuffer rowdata, int rn, long[] adrows, RandomAccessFile thefile )
            throws IOException, DataFormatException {
        int offset = (int) (adrows[rn + 1] - adrows[rn]);

        thefile.seek(adrows[rn]);
        /*
         * Read how many bytes the values are ex 1 => if encoded: 1 byte for the value and one byte
         * for the count = 2 2 => if encoded: 2 bytes for the value and one byte for the count = 3
         * etc... etc
         */
        int bytespervalue = (thefile.read() & 0xff);
        ByteBuffer cell = ByteBuffer.allocate(bytespervalue);
        int cellValue = 0;

        /* Create the buffer in which read the compressed row */
        byte[] tmp = new byte[offset - 1];
        thefile.read(tmp);
        ByteBuffer tmpBuffer = ByteBuffer.wrap(tmp);
        tmpBuffer.order(ByteOrder.nativeOrder());

        /*
         * Create the buffer in which read the decompressed row. The final decompressed row will
         * always contain 4-byte integer values
         */
        if ((offset - 1) == (bytespervalue * fileWindow.getCols())) {
            /* There is no compression in this row */
            for( int i = 0; i < offset - 1; i = i + bytespervalue ) {
                /* Read the value */
                tmpBuffer.get(cell.array());

                /*
                 * Integers can be of 1, 2, or 4 bytes. As rasterBuffer expects 4 byte integers we
                 * need to pad them with 0's. The order of the padding is determined by the
                 * ByteOrder of the buffer.
                 */
                if (bytespervalue == 1) {
                    cellValue = (cell.get(0) & 0xff);
                } else if (bytespervalue == 2) {
                    cellValue = cell.getShort(0);
                } else if (bytespervalue == 4) {
                    cellValue = cell.getInt(0);
                }
                // if (logger.isDebugEnabled()) logger.debug("tmpint=" + tmpint
                // );
                rowdata.putInt(cellValue);
            }
        } else {
            /*
             * If the row is compressed, then the values appear in pairs (like couples a party). The
             * couple is composed of the count and the value value (WARNING: this can be more than
             * one byte). Therefore, knowing the length of the compressed row we can calculate the
             * number of couples.
             */
            int couples = (offset - 1) / (1 + bytespervalue);

            for( int i = 0; i < couples; i++ ) {
                /* Read the count of values */
                int count = (tmpBuffer.get() & 0xff);

                /* Read the value */
                tmpBuffer.get(cell.array());

                /*
                 * Integers can be of 1, 2, or 4 bytes. As rasterBuffer expects 4 byte integers we
                 * need to pad them with 0's. The order of the padding is determined by the
                 * ByteOrder of the buffer.
                 */
                if (bytespervalue == 1) {
                    cellValue = (cell.get(0) & 0xff);
                } else if (bytespervalue == 2) {
                    cellValue = cell.getShort(0);
                } else if (bytespervalue == 4) {
                    cellValue = cell.getInt(0);
                }
                /*
                 * Now write the cell value the required number of times to the raster row data
                 * buffer.
                 */
                for( int j = 0; j < count; j++ ) {
                    // // if (logger.isDebugEnabled()) logger.debug(" " +
                    // tmpint);
                    rowdata.putInt(cellValue);
                }
            }
        }
    }
31315
public static byte[] create(byte[][] rowDatas, ColumnType[] columnTypes) {

    int totalLength = 0;
    for (byte[] rowData : rowDatas) {
      if (rowData == null) {
        totalLength++;
      } else {
        int length = rowData.length;
        if (length < 251) {
          totalLength += length + 1;
        } else if (length < 65536) {
          totalLength += length + 3;
        } else if (length < 16777216) {
          totalLength += length + 4;
        } else {
          totalLength += length + 9;
        }
      }
    }
    byte[] buf = new byte[totalLength];

    int pos = 0;
    for (byte[] arr : rowDatas) {
      if (arr == null) {
        buf[pos++] = (byte) 251;
      } else {
        int length = arr.length;
        if (length < 251) {
          buf[pos++] = (byte) length;
        } else if (length < 65536) {
          buf[pos++] = (byte) 0xfc;
          buf[pos++] = (byte) length;
          buf[pos++] = (byte) (length >>> 8);
        } else if (length < 16777216) {
          buf[pos++] = (byte) 0xfd;
          buf[pos++] = (byte) length;
          buf[pos++] = (byte) (length >>> 8);
          buf[pos++] = (byte) (length >>> 16);
        } else {
          buf[pos++] = (byte) 0xfe;
          buf[pos++] = (byte) length;
          buf[pos++] = (byte) (length >>> 8);
          buf[pos++] = (byte) (length >>> 16);
          buf[pos++] = (byte) (length >>> 24);
          //byte[] cannot have more than 4 byte length size, so buf[pos+5] -> buf[pos+8] = 0x00;
          pos += 4;
        }
        System.arraycopy(arr, 0, buf, pos, length);
        pos += length;
      }
    }
    return buf;
  }
720211
private String getFilterValues(final TableDataModel dataModel, final int rowIndex) {
		List<String> filterValues = dataModel.getFilterValues(rowIndex);

		if (filterValues == null || filterValues.isEmpty()) {
			return null;
		}

		StringBuffer buf = new StringBuffer(filterValues.get(0));

		for (int i = 1; i < filterValues.size(); i++) {
			buf.append(", ");
			buf.append(filterValues.get(i));
		}

		return buf.toString();
	}