Example #1
0
  /* (non-Javadoc)
   * @see com.lexst.db.head.Field#resolve(byte[], int)
   */
  @Override
  public int resolve(byte[] b, int offset) {
    int off = offset;

    dataType = b[off];
    off += 1;
    columnId = Numeric.toShort(b, off, 2);
    off += 2;

    byte sz = b[off];
    off += 1;
    byte[] nm = new byte[sz];
    System.arraycopy(b, off, nm, 0, sz);
    name = new String(nm, 0, nm.length);
    off += sz;

    indexType = b[off];
    off += 1;

    allowNull = (b[off] == 1 ? true : false);
    off += 1;

    function = b[off];
    off += 1;
    value = Numeric.toLong(b, off, 8);
    off += 8;

    return off - offset;
  }