code: public static int readVInt(DataInput in) throws IOException {
      long ret = readVLong(in);
      if ((ret > Integer.MAX_VALUE) || (ret < Integer.MIN_VALUE)) {
        throw new RuntimeException(
            "Number too large to be represented as Integer");
      }
      return (int) ret;
    }
docs: Decoding the variable-length integer. Synonymous to
  <code>(int)Utils#readVLong(in)</code>.
  
  @param in
  input stream
  @return the decoded integer
  @throws IOException
  
  @see Utils#readVLong(DataInput)