code: public static Integer convertToShort(RLPElement rpe) {
  	Integer result=0;
  	byte[] rawBytes=rpe.getRawData();
  
  	if ((rawBytes!=null)) {
  			// fill leading zeros
  			if (rawBytes.length<EthereumUtil.WORD_SIZE) {
  				byte[] fullBytes=new byte[EthereumUtil.WORD_SIZE];
  				int dtDiff=EthereumUtil.WORD_SIZE-rawBytes.length;
  				for (int i=0;i<rawBytes.length;i++) {
  					fullBytes[dtDiff+i]=rawBytes[i];
  					result=(int) ByteBuffer.wrap(fullBytes).getShort() & 0xFFFF;
  				}
  			} else {
  				result=(int) ByteBuffer.wrap(rawBytes).getShort()  & 0xFFFF;
  			}
  	}
  	return result;
  }
docs: Converts a short in a RLPElement to short
  
  @param rpe RLP element containing a raw short
  @return Integer (unsigned short) or null if not short