Formats an unknown key.<p>

@param keyName the key to format
@return the formatted unknown key

@see #isUnknownKey(String)
971990
public static String formatUnknownKey(String keyName) {

        StringBuffer buf = new StringBuffer(64);
        buf.append(UNKNOWN_KEY_EXTENSION);
        buf.append(" ");
        buf.append(keyName);
        buf.append(" ");
        buf.append(UNKNOWN_KEY_EXTENSION);
        return buf.toString();
    }
577404
public java.util.List<String> getKeyNames() {
        if (keyNames == null) {
            keyNames = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return keyNames;
    }
943412
public boolean keyMatch(String lookupKey) {
		if (key.isEmpty()) {
			return technicalName.contains(lookupKey);
		}
		else {
			return key.contains(lookupKey);
		}
	}
582473
public String getKeyAsString(Key key) {
        Objects.requireNonNull(key, Required.KEY.toString());
        
        return encodeBase64(key.getEncoded());
    }
663509
public Entity getEntityWithKey(String keyName) {
    // [START getEntityWithKey]
    Key key = datastore.newKeyFactory().setKind("MyKind").newKey(keyName);
    Entity entity = datastore.get(key);
    // Do something with the entity
    // [END getEntityWithKey]
    return entity;
  }
363332
public static Key<String> getPropertyKey(String propertyName) {
        return Key.get(String.class, Names.named(propertyName));
    }
1129294
@NonNull
  public static CreateKeyspaceStart createKeyspace(@NonNull String keyspaceName) {
    return createKeyspace(CqlIdentifier.fromCql(keyspaceName));
  }
237068
public String format( String key, Object... params )
    {
        try
        {
            MessageFormat formatter = new MessageFormat( bundle.getString( key ) );
            return formatter.format( params );
        }
        catch (MissingResourceException ex)
        {
            return key;
        }
    }
1145138
public function setKeyName($keyName)
    {
        $this->keyName     = (string)$keyName;
        $this->keyCode     = null;
        $this->charPressed = null;
        return $this;
    }
345980
public Map<String, CFMetaData> getKeyspaceMetaData(String keyspaceName)
    {
        assert keyspaceName != null;
        KSMetaData ksm = keyspaces.get(keyspaceName);
        assert ksm != null;
        return ksm.cfMetaData();
    }
305858
public static boolean existsKey(String keyName) throws RegistryException {
        String[] keyNameParts = keyName.split(REG_PATH_SEPARATOR_REGEX);

        // first part must be valid hive
        if (Hive.getHive(keyNameParts[0]) == null) {
            return false;
        }

        for (int i = 1; i < keyNameParts.length; i++) {
            // build path
            StringBuilder path = new StringBuilder();
            for (int j = 0; j < i; j++) {
                path.append(keyNameParts[j]);
                if (j < i) {
                    path.append(REG_PATH_SEPARATOR);
                }
            }

            // check if next element in path exists
            List<String> subkeys = readSubkeys(path.toString());
            if (!subkeys.contains(keyNameParts[i])) {
                return false;
            }
        }
        return true;
    }
1228459
@Override
    public final String format(String key, ClassAnnotation primaryClass) {
        if ("class.givenClass".equals(key)) {
            return shorten(primaryClass.getPackageName(), className);
        }
        if ("simpleClass".equals(key)) {
            return ClassName.extractSimpleName(className);
        }
        if ("class".equals(key)) {
            return className;
        }
        if ("package".equals(key)) {
            return getPackageName();
        }
        if ("".equals(key) && FindBugsDisplayFeatures.isAbridgedMessages() && primaryClass != null) {
            return formatPackageMember("givenClass", primaryClass);
        }
        return formatPackageMember(key, primaryClass);
    }
402646
public KeyPair getRandomKeyPair(int keySize){  
        KeyPairGenerator pairgen;
		try {
			pairgen = KeyPairGenerator.getInstance(algorithm);
			SecureRandom random = new SecureRandom();  
	        pairgen.initialize(keySize, random);  
	        return pairgen.generateKeyPair();
		} catch (Exception e) {
			log.error(e.getMessage(),e);
		}  
        return null;  
    }
905415
public String format( String key, Object[] args )
    {
        try
        {
            String pattern = getPatternString( key );
            StringBuffer buff = new StringBuffer( key.length() + SPAN );
            MessageFormat messFormat = new MessageFormat( pattern, m_locale );
            messFormat.format( args, buff, null );
            String result = buff.toString();
            buff.setLength( 0 );
            return result;
        }
        catch( MissingResourceException mre )
        {
            StringBuffer sb = new StringBuffer();
            sb.append( "Unknown resource. Bundle: '" );
            sb.append( m_baseName );
            sb.append( "' Key: '" );
            sb.append( key );
            sb.append( "' Args: '" );

            for( int i = 0; i < args.length; i++ )
            {
                if( 0 != i )
                {
                    sb.append( "', '" );
                }
                sb.append( args[ i ] );
            }

            sb.append( "' Reason: " );
            sb.append( mre );

            return sb.toString();
        }
    }
1285827
public int addKey(String key) {
        JdkUtils.requireNonNull(key);
        int nextIndex = keys.size();
        final Integer mapIndex = JdkUtils.putIfAbsent(keys, key, nextIndex);
        return mapIndex == null ? nextIndex : mapIndex;
    }
317190
public static String createKey(String keyWithoutBranch, @Nullable String branch) {
    if (StringUtils.isNotBlank(branch)) {
      return String.format(KEY_WITH_BRANCH_FORMAT, keyWithoutBranch, branch);
    } else {
      return keyWithoutBranch;
    }
  }
1004374
@NonNull
  public BatchStatementBuilder setKeyspace(@NonNull String keyspaceName) {
    return setKeyspace(CqlIdentifier.fromCql(keyspaceName));
  }