code: public static UUID fromString(String uuidString)
  	throws UUIDFormatException {
  		String leanString = uuidString.toLowerCase();
  		UUID tmpUUID = null;
  		
  		//Handle prefixed UUIDs
  		// e.g. urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6
  		int pos = uuidString.lastIndexOf(":");
  		if (pos > 1) {
  			leanString = uuidString.substring(++pos, uuidString.length());
  		}
  		
  		//Check for 36 char length
  		if (leanString.length() != UUID_FORMATTED_LENGTH) {
  			throw new UUIDFormatException(uuidString);
  		}
  		
  		//Check for 5 fields
  		StringTokenizer tok = new StringTokenizer(leanString, "-");
  		if ( tok.countTokens() != TOKENS_IN_UUID ) {
  			throw new UUIDFormatException(uuidString);
  		}
  		
  		//Remove the "-" from the formatted string and test token sizes
  		StringBuffer buf = new StringBuffer(UUID_UNFORMATTED_LENGTH);
  		String token = null;
  		int count = 0;
  		while (tok.hasMoreTokens()) {
  			token = tok.nextToken();
  			if (token.length() != TOKEN_LENGTHS[count++]) {
  				throw new UUIDFormatException(uuidString);
  			}
  			buf.append(token);
  		}
  		
  		//Create from the hex value
  		try {
  			char[] chars = buf.toString().toCharArray();
  			tmpUUID = new UUID(Hex.decodeHex(chars));
  		} catch (DecoderException de) {
  			throw new UUIDFormatException(uuidString + ": " + de.getMessage());
  		}
  		return tmpUUID;
  	}
docs: <p>Parses a string for a UUID.</p>
  
  @param uuidString the UUID formatted String to parse.
  @throws UUIDFormatException the String must be a properly formatted UUID String.
  @return Returns a UUID or null if the formatted string could not be parsed.