code: public static Long convertVarNumberToLong(RLPElement rpe) {
  		Long result=0L;
  		if (rpe.getRawData()!=null) {
  			if (rpe.getRawData().length==0) {
  				result=0L;
  			} else
  			if (rpe.getRawData().length<2) {
  				result=(long) EthereumUtil.convertToByte(rpe);
  			} else if (rpe.getRawData().length<3) {
  				result = (long) EthereumUtil.convertToShort(rpe);
  			} else if (rpe.getRawData().length<5) {
  				result=(long) EthereumUtil.convertToInt(rpe);
  			} else if (rpe.getRawData().length<9) {
  				result=EthereumUtil.convertToLong(rpe);
  			}
  		}
  		return result;
  }
docs: *
  Converts a variable size number (e.g. byte,short,int,long) in a RLPElement to long
  
  @param rpe RLPElement containing a number
  @return number as long or null if not a correct number